[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23924] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/python/BPy_Nature.cpp: Fixed wrong use of std:: string in the previous commit.

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Sun Oct 18 20:45:08 CEST 2009


Revision: 23924
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23924
Author:   kjym3
Date:     2009-10-18 20:45:08 +0200 (Sun, 18 Oct 2009)

Log Message:
-----------
Fixed wrong use of std::string in the previous commit.

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Nature.cpp

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Nature.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Nature.cpp	2009-10-18 18:05:34 UTC (rev 23923)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/python/BPy_Nature.cpp	2009-10-18 18:45:08 UTC (rev 23924)
@@ -205,21 +205,24 @@
 		return NULL;
 	}
 	if (Py_SIZE(a) != 1) {
-		string msg("operand 1: unexpected Nature byte length: " + Py_SIZE(a));
-		PyErr_SetString(PyExc_TypeError, msg.c_str());
+		stringstream msg;
+		msg << "operand 1: unexpected Nature byte length: " << Py_SIZE(a);
+		PyErr_SetString(PyExc_TypeError, msg.str().c_str());
 		return NULL;
 	}
 	if (Py_SIZE(b) != 1) {
-		string msg("operand 2: unexpected Nature byte length: " + Py_SIZE(b));
-		PyErr_SetString(PyExc_TypeError, msg.c_str());
+		stringstream msg;
+		msg << "operand 2: unexpected Nature byte length: " << Py_SIZE(b);
+		PyErr_SetString(PyExc_TypeError, msg.str().c_str());
 		return NULL;
 	}
 	result = PyObject_NewVar(BPy_Nature, &Nature_Type, 1);
 	if (!result)
 		return NULL;
 	if (Py_SIZE(result) != 1) {
-		string msg("unexpected Nature byte length: " + Py_SIZE(result));
-		PyErr_SetString(PyExc_TypeError, msg.c_str());
+		stringstream msg;
+		msg << "unexpected Nature byte length: " << Py_SIZE(result);
+		PyErr_SetString(PyExc_TypeError, msg.str().c_str());
 		return NULL;
 	}
 	switch (op) {





More information about the Bf-blender-cvs mailing list