Merge branch 'development' into cmake/SPEC-7484
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> # Conflicts: # Code/Editor/Animation/SkeletonHierarchy.cpp # Code/Editor/Animation/SkeletonMapper.cpp # Code/Editor/Animation/SkeletonMapperOperator.cpp # Code/Editor/LogFile.cpp # Code/Editor/ResourceSelectorHost.cpp # Code/Editor/SettingsManager.cpp # Code/Editor/Util/EditorUtils.cpp # Code/Editor/Util/FileUtil.cpp # Code/Editor/Util/IXmlHistoryManager.h # Code/Editor/Util/ImageTIF.cpp # Code/Editor/Util/StringHelpers.cpp # Code/Editor/Util/XmlHistoryManager.cpp # Code/Editor/Util/XmlHistoryManager.h
This commit is contained in:
@@ -148,13 +148,13 @@ bool CImageUtil::LoadPGM(const QString& fileName, CImageEx& image)
|
||||
char* nextToken = nullptr;
|
||||
token = azstrtok(str, 0, seps, &nextToken);
|
||||
|
||||
while (token != NULL && token[0] == '#')
|
||||
while (token != nullptr && token[0] == '#')
|
||||
{
|
||||
if (token != NULL && token[0] == '#')
|
||||
if (token != nullptr && token[0] == '#')
|
||||
{
|
||||
azstrtok(NULL, 0, "\n", &nextToken);
|
||||
azstrtok(nullptr, 0, "\n", &nextToken);
|
||||
}
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
}
|
||||
if (azstricmp(token, "P2") != 0)
|
||||
{
|
||||
@@ -166,32 +166,32 @@ bool CImageUtil::LoadPGM(const QString& fileName, CImageEx& image)
|
||||
|
||||
do
|
||||
{
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
if (token != NULL && token[0] == '#')
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
if (token != nullptr && token[0] == '#')
|
||||
{
|
||||
azstrtok(NULL, 0, "\n", &nextToken);
|
||||
azstrtok(nullptr, 0, "\n", &nextToken);
|
||||
}
|
||||
} while (token != NULL && token[0] == '#');
|
||||
} while (token != nullptr && token[0] == '#');
|
||||
width = atoi(token);
|
||||
|
||||
do
|
||||
{
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
if (token != NULL && token[0] == '#')
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
if (token != nullptr && token[0] == '#')
|
||||
{
|
||||
azstrtok(NULL, 0, "\n", &nextToken);
|
||||
azstrtok(nullptr, 0, "\n", &nextToken);
|
||||
}
|
||||
} while (token != NULL && token[0] == '#');
|
||||
} while (token != nullptr && token[0] == '#');
|
||||
height = atoi(token);
|
||||
|
||||
do
|
||||
{
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
if (token != NULL && token[0] == '#')
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
if (token != nullptr && token[0] == '#')
|
||||
{
|
||||
azstrtok(NULL, 0, "\n", &nextToken);
|
||||
azstrtok(nullptr, 0, "\n", &nextToken);
|
||||
}
|
||||
} while (token != NULL && token[0] == '#');
|
||||
} while (token != nullptr && token[0] == '#');
|
||||
numColors = atoi(token);
|
||||
|
||||
image.Allocate(width, height);
|
||||
@@ -199,12 +199,12 @@ bool CImageUtil::LoadPGM(const QString& fileName, CImageEx& image)
|
||||
uint32* p = image.GetData();
|
||||
int size = width * height;
|
||||
int i = 0;
|
||||
while (token != NULL && i < size)
|
||||
while (token != nullptr && i < size)
|
||||
{
|
||||
do
|
||||
{
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
} while (token != NULL && token[0] == '#');
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
} while (token != nullptr && token[0] == '#');
|
||||
*p++ = atoi(token);
|
||||
i++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user