fix some errors/warnings found by static code analyzer

This commit is contained in:
abma
2014-12-16 23:41:10 +01:00
parent 7694561121
commit b1221ade64
7 changed files with 10 additions and 11 deletions

View File

@@ -464,7 +464,7 @@ std::string LWSImporter::FindLWOFile(const std::string& in)
std::string tmp;
if (in.length() > 3 && in[1] == ':'&& in[2] != '\\' && in[2] != '/')
{
tmp = in[0] + (":\\" + in.substr(2));
tmp = in[0] + (std::string(":\\") + in.substr(2));
}
else tmp = in;
@@ -480,12 +480,12 @@ std::string LWSImporter::FindLWOFile(const std::string& in)
// <folder>\Scenes\<hh>\<*>.lws
// where <hh> is optional.
std::string test = ".." + (io->getOsSeparator() + tmp);
std::string test = std::string("..") + (io->getOsSeparator() + tmp);
if (io->Exists(test)) {
return test;
}
test = ".." + (io->getOsSeparator() + test);
test = std::string("..") + (io->getOsSeparator() + test);
if (io->Exists(test)) {
return test;
}