Mercurial > hg > orthanc
diff OrthancServer/LuaScripting.cpp @ 1545:33d34bc4ac15
fix msvc warnings
author | jodogne |
---|---|
date | Thu, 13 Aug 2015 21:02:31 +0200 |
parents | f967bdf8534e |
children | 3232f1c995a5 |
line wrap: on
line diff
--- a/OrthancServer/LuaScripting.cpp Thu Aug 13 20:39:30 2015 +0200 +++ b/OrthancServer/LuaScripting.cpp Thu Aug 13 21:02:31 2015 +0200 @@ -81,7 +81,7 @@ } const char* uri = lua_tostring(state, 1); - bool builtin = (nArgs == 2 ? lua_toboolean(state, 2) : false); + bool builtin = (nArgs == 2 ? lua_toboolean(state, 2) != 0 : false); std::string result; if (HttpToolbox::SimpleGet(result, serverContext->GetHttpHandler().RestrictToOrthancRestApi(builtin), uri)) @@ -124,7 +124,7 @@ const char* uri = lua_tostring(state, 1); size_t bodySize = 0; const char* bodyData = lua_tolstring(state, 2, &bodySize); - bool builtin = (nArgs == 3 ? lua_toboolean(state, 3) : false); + bool builtin = (nArgs == 3 ? lua_toboolean(state, 3) != 0 : false); std::string result; if (isPost ? @@ -182,7 +182,7 @@ } const char* uri = lua_tostring(state, 1); - bool builtin = (nArgs == 2 ? lua_toboolean(state, 2) : false); + bool builtin = (nArgs == 2 ? lua_toboolean(state, 2) != 0 : false); if (HttpToolbox::SimpleDelete(serverContext->GetHttpHandler().RestrictToOrthancRestApi(builtin), uri)) {