Use `std::numeric_limits` in C++

Summary:
Instead of using `UINT32_MAX` in C++ code, use `std::numeric_limits<uint32_t>::max()`. The `UINT32_MAX` macro is not available in all compilation setups
Closes https://github.com/facebook/react-native/pull/5481

Reviewed By: svcscm

Differential Revision: D2854545

Pulled By: androidtrunkagent

fb-gh-sync-id: 00a70b429c78bcf120866bb59fae2ffe6330a910
This commit is contained in:
David Aurelio 2016-01-22 03:23:51 -08:00 committed by facebook-github-bot-9
parent 2a70c53947
commit 35e1fd8826
1 changed files with 1 additions and 1 deletions

View File

@ -340,7 +340,7 @@ JSValueRef JSCExecutor::nativeRequire(
}
double moduleId = JSValueToNumber(ctx, arguments[0], exception);
if (moduleId <= (double) UINT32_MAX && moduleId >= 0.0) {
if (moduleId <= (double) std::numeric_limits<uint32_t>::max() && moduleId >= 0.0) {
try {
executor->loadModule(moduleId);
} catch (JSModulesUnbundle::ModuleNotFound&) {