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

This commit is contained in:
2016-05-29 01:30:20 +02:00
parent 5366900ace
commit af185e1154

View File

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