mirror of https://github.com/axmolengine/axmol.git
Modify warning code.
This commit is contained in:
parent
6cac4dd512
commit
d3783cba95
|
@ -1218,19 +1218,19 @@ Offset<ProjectNodeOptions> FlatBuffersSerialize::createProjectNodeOptionsForSimu
|
||||||
|
|
||||||
if (name == "FileData")
|
if (name == "FileData")
|
||||||
{
|
{
|
||||||
const tinyxml2::XMLAttribute* attribute = child->FirstAttribute();
|
const tinyxml2::XMLAttribute* attributeFileData = child->FirstAttribute();
|
||||||
|
|
||||||
while (attribute)
|
while (attributeFileData)
|
||||||
{
|
{
|
||||||
name = attribute->Name();
|
name = attributeFileData->Name();
|
||||||
std::string value = attribute->Value();
|
std::string value = attributeFileData->Value();
|
||||||
|
|
||||||
if (name == "Path")
|
if (name == "Path")
|
||||||
{
|
{
|
||||||
filename = value;
|
filename = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute = attribute->Next();
|
attributeFileData = attributeFileData->Next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,9 +151,9 @@ cocos2d::Node* ArmatureNodeReader::createNodeWithFlatBuffers(const flatbuffers:
|
||||||
std::string ArmatureNodeReader::getArmatureName(const std::string& exporJsonPath)
|
std::string ArmatureNodeReader::getArmatureName(const std::string& exporJsonPath)
|
||||||
{
|
{
|
||||||
//FileUtils.getFileData(exporJsonPath, "r", size) // need read armature name in exportJsonPath
|
//FileUtils.getFileData(exporJsonPath, "r", size) // need read armature name in exportJsonPath
|
||||||
int end = exporJsonPath.find_last_of(".");
|
size_t end = exporJsonPath.find_last_of(".");
|
||||||
int start = exporJsonPath.find_last_of("\\") + 1;
|
size_t start = exporJsonPath.find_last_of("\\") + 1;
|
||||||
int start1 = exporJsonPath.find_last_of("/") + 1;
|
size_t start1 = exporJsonPath.find_last_of("/") + 1;
|
||||||
if (start < start1)
|
if (start < start1)
|
||||||
start = start1;
|
start = start1;
|
||||||
|
|
||||||
|
|
|
@ -185,11 +185,11 @@ namespace cocostudio
|
||||||
|
|
||||||
if (name == "InnerNodeSize")
|
if (name == "InnerNodeSize")
|
||||||
{
|
{
|
||||||
auto attribute = child->FirstAttribute();
|
auto attributeInnerNodeSize = child->FirstAttribute();
|
||||||
while (attribute)
|
while (attributeInnerNodeSize)
|
||||||
{
|
{
|
||||||
name = attribute->Name();
|
name = attributeInnerNodeSize->Name();
|
||||||
std::string value = attribute->Value();
|
std::string value = attributeInnerNodeSize->Value();
|
||||||
|
|
||||||
if (name == "Width")
|
if (name == "Width")
|
||||||
{
|
{
|
||||||
|
@ -200,17 +200,17 @@ namespace cocostudio
|
||||||
innerSize.height = atof(value.c_str());
|
innerSize.height = atof(value.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute = attribute->Next();
|
attributeInnerNodeSize = attributeInnerNodeSize->Next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (name == "Size" && backGroundScale9Enabled)
|
else if (name == "Size" && backGroundScale9Enabled)
|
||||||
{
|
{
|
||||||
auto attribute = child->FirstAttribute();
|
auto attributeSize = child->FirstAttribute();
|
||||||
|
|
||||||
while (attribute)
|
while (attributeSize)
|
||||||
{
|
{
|
||||||
name = attribute->Name();
|
name = attributeSize->Name();
|
||||||
std::string value = attribute->Value();
|
std::string value = attributeSize->Value();
|
||||||
|
|
||||||
if (name == "X")
|
if (name == "X")
|
||||||
{
|
{
|
||||||
|
@ -221,17 +221,17 @@ namespace cocostudio
|
||||||
scale9Size.height = atof(value.c_str());
|
scale9Size.height = atof(value.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute = attribute->Next();
|
attributeSize = attributeSize->Next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (name == "SingleColor")
|
else if (name == "SingleColor")
|
||||||
{
|
{
|
||||||
auto attribute = child->FirstAttribute();
|
auto attributeSingleColor = child->FirstAttribute();
|
||||||
|
|
||||||
while (attribute)
|
while (attributeSingleColor)
|
||||||
{
|
{
|
||||||
name = attribute->Name();
|
name = attributeSingleColor->Name();
|
||||||
std::string value = attribute->Value();
|
std::string value = attributeSingleColor->Value();
|
||||||
|
|
||||||
if (name == "R")
|
if (name == "R")
|
||||||
{
|
{
|
||||||
|
@ -246,17 +246,17 @@ namespace cocostudio
|
||||||
bgColor.b = atoi(value.c_str());
|
bgColor.b = atoi(value.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute = attribute->Next();
|
attributeSingleColor = attributeSingleColor->Next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (name == "EndColor")
|
else if (name == "EndColor")
|
||||||
{
|
{
|
||||||
auto attribute = child->FirstAttribute();
|
auto attributeEndColor = child->FirstAttribute();
|
||||||
|
|
||||||
while (attribute)
|
while (attributeEndColor)
|
||||||
{
|
{
|
||||||
name = attribute->Name();
|
name = attributeEndColor->Name();
|
||||||
std::string value = attribute->Value();
|
std::string value = attributeEndColor->Value();
|
||||||
|
|
||||||
if (name == "R")
|
if (name == "R")
|
||||||
{
|
{
|
||||||
|
@ -271,17 +271,17 @@ namespace cocostudio
|
||||||
bgEndColor.b = atoi(value.c_str());
|
bgEndColor.b = atoi(value.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute = attribute->Next();
|
attributeEndColor = attributeEndColor->Next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (name == "FirstColor")
|
else if (name == "FirstColor")
|
||||||
{
|
{
|
||||||
auto attribute = child->FirstAttribute();
|
auto attributeFirstColor = child->FirstAttribute();
|
||||||
|
|
||||||
while (attribute)
|
while (attributeFirstColor)
|
||||||
{
|
{
|
||||||
name = attribute->Name();
|
name = attributeFirstColor->Name();
|
||||||
std::string value = attribute->Value();
|
std::string value = attributeFirstColor->Value();
|
||||||
|
|
||||||
if (name == "R")
|
if (name == "R")
|
||||||
{
|
{
|
||||||
|
@ -296,16 +296,16 @@ namespace cocostudio
|
||||||
bgStartColor.b = atoi(value.c_str());
|
bgStartColor.b = atoi(value.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute = attribute->Next();
|
attributeFirstColor = attributeFirstColor->Next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (name == "ColorVector")
|
else if (name == "ColorVector")
|
||||||
{
|
{
|
||||||
auto attribute = child->FirstAttribute();
|
auto attributeColorVector = child->FirstAttribute();
|
||||||
while (attribute)
|
while (attributeColorVector)
|
||||||
{
|
{
|
||||||
name = attribute->Name();
|
name = attributeColorVector->Name();
|
||||||
std::string value = attribute->Value();
|
std::string value = attributeColorVector->Value();
|
||||||
|
|
||||||
if (name == "ScaleX")
|
if (name == "ScaleX")
|
||||||
{
|
{
|
||||||
|
@ -316,7 +316,7 @@ namespace cocostudio
|
||||||
colorVector.y = atof(value.c_str());
|
colorVector.y = atof(value.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute = attribute->Next();
|
attributeColorVector = attributeColorVector->Next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (name == "FileData")
|
else if (name == "FileData")
|
||||||
|
@ -324,12 +324,12 @@ namespace cocostudio
|
||||||
std::string texture;
|
std::string texture;
|
||||||
std::string texturePng;
|
std::string texturePng;
|
||||||
|
|
||||||
auto attribute = child->FirstAttribute();
|
auto attributeFileData = child->FirstAttribute();
|
||||||
|
|
||||||
while (attribute)
|
while (attributeFileData)
|
||||||
{
|
{
|
||||||
name = attribute->Name();
|
name = attributeFileData->Name();
|
||||||
std::string value = attribute->Value();
|
std::string value = attributeFileData->Value();
|
||||||
|
|
||||||
if (name == "Path")
|
if (name == "Path")
|
||||||
{
|
{
|
||||||
|
@ -345,7 +345,7 @@ namespace cocostudio
|
||||||
texture = value;
|
texture = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute = attribute->Next();
|
attributeFileData = attributeFileData->Next();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resourceType == 1)
|
if (resourceType == 1)
|
||||||
|
|
|
@ -98,12 +98,12 @@ namespace cocostudio
|
||||||
|
|
||||||
if (name == "FileData")
|
if (name == "FileData")
|
||||||
{
|
{
|
||||||
const tinyxml2::XMLAttribute* attribute = child->FirstAttribute();
|
const tinyxml2::XMLAttribute* attributeFileData = child->FirstAttribute();
|
||||||
|
|
||||||
while (attribute)
|
while (attributeFileData)
|
||||||
{
|
{
|
||||||
name = attribute->Name();
|
name = attributeFileData->Name();
|
||||||
std::string value = attribute->Value();
|
std::string value = attributeFileData->Value();
|
||||||
|
|
||||||
if (name == "Path")
|
if (name == "Path")
|
||||||
{
|
{
|
||||||
|
@ -112,7 +112,7 @@ namespace cocostudio
|
||||||
filename = convert;
|
filename = convert;
|
||||||
}
|
}
|
||||||
|
|
||||||
attribute = attribute->Next();
|
attributeFileData = attributeFileData->Next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -779,7 +779,7 @@ namespace cocostudio
|
||||||
//assume versionString is like "2.0.6.0"
|
//assume versionString is like "2.0.6.0"
|
||||||
if (versionString.length() > 0)
|
if (versionString.length() > 0)
|
||||||
{
|
{
|
||||||
int p1, p2, p3, v1, v2, v3;
|
size_t p1, p2, p3, v1, v2, v3;
|
||||||
p1 = p2 = p3 = v1 = v2 = v3 = 0;
|
p1 = p2 = p3 = v1 = v2 = v3 = 0;
|
||||||
p1 = versionString.find('.');
|
p1 = versionString.find('.');
|
||||||
if (p1 > 0)
|
if (p1 > 0)
|
||||||
|
|
Loading…
Reference in New Issue