Restore C++98 compatibility (NULL instead of nullptr)

and print a message when libcurl has been found
This commit is contained in:
Daniel Gibson 2021-07-17 18:24:46 +02:00
parent 4d12093a54
commit 06ff49c6b6
6 changed files with 11 additions and 8 deletions

View file

@ -184,6 +184,7 @@ find_package(CURL QUIET)
if(CURL_FOUND)
set(ID_ENABLE_CURL ON)
include_directories(${CURL_INCLUDE_DIR})
message(STATUS "libcurl found and enabled")
else()
message(WARNING "libcurl not found, server downloads won't be available (apart from that dhewm3 will work)")
set(ID_ENABLE_CURL OFF)

View file

@ -305,7 +305,7 @@ void idGameLocal::Clear( void ) {
static bool ( *updateDebuggerFnPtr )( idInterpreter *interpreter, idProgram *program, int instructionPointer ) = NULL;
bool updateGameDebugger( idInterpreter *interpreter, idProgram *program, int instructionPointer ) {
bool ret = false;
if ( interpreter != nullptr && program != nullptr ) {
if ( interpreter != NULL && program != NULL ) {
ret = updateDebuggerFnPtr ? updateDebuggerFnPtr( interpreter , program, instructionPointer ) : false;
}
return ret;

View file

@ -273,7 +273,7 @@ bool IsDoom3DemoVersion()
static bool ( *updateDebuggerFnPtr )( idInterpreter *interpreter, idProgram *program, int instructionPointer ) = NULL;
bool updateGameDebugger( idInterpreter *interpreter, idProgram *program, int instructionPointer ) {
bool ret = false;
if ( interpreter != nullptr && program != nullptr ) {
if ( interpreter != NULL && program != NULL ) {
ret = updateDebuggerFnPtr ? updateDebuggerFnPtr( interpreter, program, instructionPointer ) : false;
}
return ret;

View file

@ -29,6 +29,7 @@ If you have questions concerning this license or the applicable additional terms
#include "sys/platform.h"
#include "sound/snd_local.h"
#include <limits.h>
#ifdef ID_DEDICATED
idCVar idSoundSystemLocal::s_noSound( "s_noSound", "1", CVAR_SOUND | CVAR_BOOL | CVAR_ROM, "" );

View file

@ -59,7 +59,8 @@ If you have questions concerning this license or the applicable additional terms
#define SDLK_PRINTSCREEN SDLK_PRINT
#endif
static const char *kbdNames[] = {
// NOTE: g++-4.7 doesn't like when this is static (for idCmdSystem::ArgCompletion_String<kbdNames>)
const char *kbdNames[] = {
#if SDL_VERSION_ATLEAST(2, 0, 0) // auto-detection is only available for SDL2
"auto",
#endif

View file

@ -187,13 +187,13 @@ bool rvDebuggerServer::ProcessMessages ( void )
case DBMSG_CONNECT:
mConnected = true;
SendMessage ( DBMSG_CONNECTED );
HandleInspectScripts ( nullptr );
HandleInspectScripts ( NULL );
com_editors |= EDITOR_DEBUGGER;
break;
case DBMSG_CONNECTED:
mConnected = true;
HandleInspectScripts( nullptr );
HandleInspectScripts( NULL );
com_editors |= EDITOR_DEBUGGER;
break;
@ -555,7 +555,7 @@ void rvDebuggerServer::CheckBreakpoints ( idInterpreter* interpreter, idProgram*
// See if we are supposed to break on the next script line
if ( mBreakNext )
{
HandleInspectScripts(nullptr);
HandleInspectScripts(NULL);
Break ( interpreter, program, instructionPointer );
return;
}
@ -574,7 +574,7 @@ void rvDebuggerServer::CheckBreakpoints ( idInterpreter* interpreter, idProgram*
// See if we are supposed to break on the next line
if ( mBreakStepInto )
{
HandleInspectScripts(nullptr);
HandleInspectScripts(NULL);
// Break
Break ( interpreter, program, instructionPointer );
return;
@ -625,7 +625,7 @@ void rvDebuggerServer::CheckBreakpoints ( idInterpreter* interpreter, idProgram*
// Pop out of the critical section so we dont get stuck
SDL_UnlockMutex( mCriticalSection );
HandleInspectScripts(nullptr);
HandleInspectScripts(NULL);
// We hit a breakpoint, so break
Break ( interpreter, program, instructionPointer );