Integrate C++11 branch into 5_1-new
This commit is contained in:
@@ -337,7 +337,7 @@ void ScreenTextEntry::End( bool bCancelled )
|
||||
{
|
||||
RString sAnswer = WStringToRString(m_sAnswer);
|
||||
RString sError;
|
||||
if( g_pValidate != NULL )
|
||||
if( g_pValidate != nullptr )
|
||||
{
|
||||
bool bValidAnswer = g_pValidate( sAnswer, sError );
|
||||
if( !bValidAnswer )
|
||||
@@ -384,7 +384,7 @@ void ScreenTextEntry::TextEntrySettings::FromStack( lua_State *L )
|
||||
// Get ScreenMessage
|
||||
lua_getfield( L, iTab, "SendOnPop" );
|
||||
const char *pStr = lua_tostring( L, -1 );
|
||||
if( pStr == NULL )
|
||||
if( pStr == nullptr )
|
||||
smSendOnPop = SM_None;
|
||||
else
|
||||
smSendOnPop = ScreenMessageHelpers::ToScreenMessage( pStr );
|
||||
@@ -393,7 +393,7 @@ void ScreenTextEntry::TextEntrySettings::FromStack( lua_State *L )
|
||||
// Get Question
|
||||
lua_getfield( L, iTab, "Question" );
|
||||
pStr = lua_tostring( L, -1 );
|
||||
if( pStr == NULL )
|
||||
if( pStr == nullptr )
|
||||
{
|
||||
LuaHelpers::ReportScriptError("ScreenTextEntry \"Question\" entry is not a string.");
|
||||
pStr= "";
|
||||
@@ -404,7 +404,7 @@ void ScreenTextEntry::TextEntrySettings::FromStack( lua_State *L )
|
||||
// Get Initial Answer
|
||||
lua_getfield( L, iTab, "InitialAnswer" );
|
||||
pStr = lua_tostring( L, -1 );
|
||||
if( pStr == NULL )
|
||||
if( pStr == nullptr )
|
||||
pStr = "";
|
||||
sInitialAnswer = pStr;
|
||||
lua_settop( L, iTab );
|
||||
|
||||
Reference in New Issue
Block a user