Use std::atoi instead of std::stoi
authorDavid Neto <dneto@google.com>
Mon, 31 Oct 2016 21:02:45 +0000 (17:02 -0400)
committerDavid Neto <dneto@google.com>
Mon, 31 Oct 2016 21:02:45 +0000 (17:02 -0400)
Some Android cross cross-compilers don't have std::stoi.

E.g. i686-linux-android-g++ from Android NDK r10e don't have std::stoi.

StandAlone/ResourceLimits.cpp

index 10ede09..e22ec80 100644 (file)
@@ -263,7 +263,7 @@ void DecodeResourceLimits(TBuiltInResource* resources, char* config)
             return;
         }
 
-        const int value = std::stoi(valueStr);
+        const int value = std::atoi(valueStr.c_str());
 
         if (tokenStr == "MaxLights")
             resources->maxLights = value;