[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48133] trunk/blender/source/blender/ compositor/operations: fix for use of 2 uninitialized vars in the tiles compositor.
Campbell Barton
ideasman42 at gmail.com
Wed Jun 20 19:35:51 CEST 2012
Revision: 48133
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48133
Author: campbellbarton
Date: 2012-06-20 17:35:51 +0000 (Wed, 20 Jun 2012)
Log Message:
-----------
fix for use of 2 uninitialized vars in the tiles compositor.
Modified Paths:
--------------
trunk/blender/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
trunk/blender/source/blender/compositor/operations/COM_RotateOperation.cpp
Modified: trunk/blender/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp 2012-06-20 17:35:00 UTC (rev 48132)
+++ trunk/blender/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp 2012-06-20 17:35:51 UTC (rev 48133)
@@ -46,7 +46,7 @@
float *buffer = tile->getBuffer();
int size = tile->getWidth() * tile->getHeight();
int pixels = 0;
- float sum;
+ float sum = 0.0f;
float mean = this->result;
for (int i = 0, offset = 0; i < size; i++, offset += 4) {
if (buffer[offset + 3] > 0) {
Modified: trunk/blender/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_ReadBufferOperation.cpp 2012-06-20 17:35:00 UTC (rev 48132)
+++ trunk/blender/source/blender/compositor/operations/COM_ReadBufferOperation.cpp 2012-06-20 17:35:51 UTC (rev 48133)
@@ -76,7 +76,8 @@
return false;
}
-void ReadBufferOperation::readResolutionFromWriteBuffer() {
+void ReadBufferOperation::readResolutionFromWriteBuffer()
+{
if (this->memoryProxy != NULL) {
WriteBufferOperation *operation = memoryProxy->getWriteBufferOperation();
this->setWidth(operation->getWidth());
Modified: trunk/blender/source/blender/compositor/operations/COM_RotateOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_RotateOperation.cpp 2012-06-20 17:35:00 UTC (rev 48132)
+++ trunk/blender/source/blender/compositor/operations/COM_RotateOperation.cpp 2012-06-20 17:35:51 UTC (rev 48133)
@@ -48,7 +48,8 @@
this->degreeSocket = NULL;
}
-inline void RotateOperation::ensureDegree() {
+inline void RotateOperation::ensureDegree()
+{
if (!isDegreeSet) {
float degree[4];
this->degreeSocket->read(degree, 0, 0, COM_PS_NEAREST, NULL);
More information about the Bf-blender-cvs
mailing list