[Bf-blender-cvs] [af185e1] master: fixed some incompatible definitions (to make this work also on linux)

Gaia Clary noreply at git.blender.org
Sun May 29 01:30:36 CEST 2016


Commit: af185e1154a441aba79f7c20cba6040933280f49
Author: Gaia Clary
Date:   Sun May 29 01:30:20 2016 +0200
Branches: master
https://developer.blender.org/rBaf185e1154a441aba79f7c20cba6040933280f49

fixed some incompatible definitions (to make this work also on linux)

===================================================================

M	source/blender/collada/collada_utils.cpp

===================================================================

diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index 5a84eed..1377563 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -516,7 +516,7 @@ void BoneExtended::set_bone_layers(std::string layerString, std::vector<std::str
 		/* Blender uses numbers to specify layers*/
 		if (isInteger(layer))
 		{
-			pos = std::stoi(layer);
+			pos = atoi(layer.c_str());
 			if (pos >= 0 || pos < 32) {
 				this->bone_layers = bc_set_layer(this->bone_layers, pos);
 				continue;
@@ -549,16 +549,17 @@ std::string BoneExtended::get_bone_layers(int bitfield)
 	std::string sep = "";
 	int bit = 1u;
 
+	std::ostringstream ss;
 	for (int i = 0; i < 32; i++)
 	{
 		if (bit & bitfield)
 		{
-			result += sep + std::to_string(i);
+			ss << sep << i;
 			sep = " ";
 		}
 		bit = bit << 1;
 	}
-	return result;
+	return ss.str();
 }
 
 int BoneExtended::get_bone_layers()




More information about the Bf-blender-cvs mailing list