Page MenuHome

tile-branch-msvc-fixes.patch

tile-branch-msvc-fixes.patch

Index: source/blender/compositor/intern/COM_ExecutionGroup.cpp
===================================================================
--- source/blender/compositor/intern/COM_ExecutionGroup.cpp (revision 42468)
+++ source/blender/compositor/intern/COM_ExecutionGroup.cpp (working copy)
@@ -205,7 +205,7 @@
this->chunksFinished = 0;
this->bTree = bTree;
unsigned int index;
- unsigned int chunkOrder[this->numberOfChunks];
+ unsigned int *chunkOrder = new unsigned int[this->numberOfChunks];
for (chunkNumber = 0 ; chunkNumber<this->numberOfChunks ; chunkNumber++) {
chunkOrder[chunkNumber] = chunkNumber;
@@ -237,8 +237,8 @@
ChunkOrderHotspot **hotspots = new ChunkOrderHotspot*[1];
hotspots[0] = new ChunkOrderHotspot(this->width*centerX, this->height*centerY, 0.0f);
rcti rect;
- ChunkOrder chunkOrders[numberOfChunks];
- for (index = 0 ; index < numberOfChunks; index ++) {
+ ChunkOrder *chunkOrders = new ChunkOrder[this->numberOfChunks];
+ for (index = 0 ; index < this->numberOfChunks; index ++) {
determineChunkRect(&rect, index);
chunkOrders[index].setChunkNumber(index);
chunkOrders[index].setX(rect.xmin);
@@ -252,7 +252,8 @@
}
delete hotspots[0];
- delete hotspots;
+ delete[] hotspots;
+ delete[] chunkOrders;
}
break;
case COM_TO_RULE_OF_THIRDS:
@@ -276,8 +277,8 @@
hotspots[7] = new ChunkOrderHotspot(mx, ty, addition*7);
hotspots[8] = new ChunkOrderHotspot(mx, by, addition*8);
rcti rect;
- ChunkOrder chunkOrders[numberOfChunks];
- for (index = 0 ; index < numberOfChunks; index ++) {
+ ChunkOrder *chunkOrders = new ChunkOrder[this->numberOfChunks];
+ for (index = 0 ; index < this->numberOfChunks; index ++) {
determineChunkRect(&rect, index);
chunkOrders[index].setChunkNumber(index);
chunkOrders[index].setX(rect.xmin);
@@ -300,7 +301,8 @@
delete hotspots[6];
delete hotspots[7];
delete hotspots[8];
- delete hotspots;
+ delete[] hotspots;
+ delete[] chunkOrders;
}
break;
case COM_TO_TOP_DOWN:
@@ -343,6 +345,8 @@
breaked = true;
}
}
+
+ delete chunkOrder;
}
MemoryBuffer** ExecutionGroup::getInputBuffers(int chunkNumber) {
Index: source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp
===================================================================
--- source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp (revision 42468)
+++ source/blender/compositor/intern/COM_ChunkOrderHotspot.cpp (working copy)
@@ -32,7 +32,7 @@
double ChunkOrderHotspot::determineDistance(int x, int y) {
int dx = x-this->x;
int dy = y-this->y;
- double result = sqrt(dx*dx+dy*dy);
+ double result = sqrt((double)(dx*dx+dy*dy));
result += this->addition;
return result;
}
Index: source/blender/compositor/COM_defines.h
===================================================================
--- source/blender/compositor/COM_defines.h (revision 42468)
+++ source/blender/compositor/COM_defines.h (working copy)
@@ -56,7 +56,7 @@
// chunk size determination
#define COM_PREVIEW_SIZE 140.0f
-#define COM_OPENCL_ENABLED true
+#define COM_OPENCL_ENABLED TRUE
// workscheduler threading models
/**
* COM_TM_PTHREAD is a threading model based on pthread library. where the control (picking new work) is done by each thread
@@ -97,7 +97,7 @@
/**
* enable the balancing of memory (saving MemoryBuffer to disc) to free memory
*/
-#define COM_MM_ENABLE false
+#define COM_MM_ENABLE FALSE
#define COM_RM_NORMAL 0
#define COM_RM_LINEAR 1
Index: source/blender/compositor/operations/COM_MathBaseOperation.cpp
===================================================================
--- source/blender/compositor/operations/COM_MathBaseOperation.cpp (revision 42468)
+++ source/blender/compositor/operations/COM_MathBaseOperation.cpp (working copy)
@@ -166,9 +166,9 @@
float y_mod_1 = fmod(inputValue2[0], 1);
/* if input value is not nearly an integer, fall back to zero, nicer than straight rounding */
if (y_mod_1 > 0.999 || y_mod_1 < 0.001) {
- outputValue[0]= pow(inputValue1[0], floor(inputValue2[0] + 0.5));
+ outputValue[0]= pow(inputValue1[0], (float)floor(inputValue2[0] + 0.5));
} else {
- outputValue[0] = 0.0;
+ outputValue[0] = 0.0;
}
}
}
Index: source/blender/compositor/operations/COM_TonemapOperation.cpp
===================================================================
--- source/blender/compositor/operations/COM_TonemapOperation.cpp (revision 42468)
+++ source/blender/compositor/operations/COM_TonemapOperation.cpp (working copy)
@@ -57,9 +57,9 @@
output[2] /= ((db == 0.f) ? 1.f : db);
const float igm = avg->igm;
if (igm != 0.f) {
- output[0] = pow((double)MAX2(output[0], 0.), igm);
- output[1] = pow((double)MAX2(output[1], 0.), igm);
- output[2] = pow((double)MAX2(output[2], 0.), igm);
+ output[0] = pow((double)MAX2(output[0], 0.), (double)igm);
+ output[1] = pow((double)MAX2(output[1], 0.), (double)igm);
+ output[2] = pow((double)MAX2(output[2], 0.), (double)igm);
}
color[0] = output[0];
Index: source/blender/blenlib/BLI_math_base.h
===================================================================
--- source/blender/blenlib/BLI_math_base.h (revision 42468)
+++ source/blender/blenlib/BLI_math_base.h (working copy)
@@ -78,10 +78,10 @@
#endif
#ifndef sqrtf
-#define sqrtf(a) ((float)sqrt(a))
+#define sqrtf(a) ((float)sqrt((float)a))
#endif
#ifndef powf
-#define powf(a, b) ((float)pow(a, b))
+#define powf(a, b) ((float)pow((float)a, (float)b))
#endif
#ifndef cosf
#define cosf(a) ((float)cos(a))

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f7/7f/8dabdeb7adc4c787076621916b25

Event Timeline