From 5cf05e3134eaf03635286bb247fc7bb66916c94f Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 9 Sep 2023 02:46:20 +0300 Subject: [PATCH] client: enable C++ exceptions --- cl_dll/vgui_TheWastesViewport.cpp | 9 ++++++--- wscript | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cl_dll/vgui_TheWastesViewport.cpp b/cl_dll/vgui_TheWastesViewport.cpp index 65792e0..e68554b 100644 --- a/cl_dll/vgui_TheWastesViewport.cpp +++ b/cl_dll/vgui_TheWastesViewport.cpp @@ -748,11 +748,14 @@ try pfile = gEngfuncs.COM_ParseFile(pfile, token); } } -catch( CException *e ) +catch( ... /* CException *e */ ) { - e; + // a1ba: we don't do anything with the exception here + // and code above doesn't look like a code that would throw an exception + // so comment out CException + // e; //e->Delete(); - e = NULL; + // e = NULL; m_iInitialized = false; return; } diff --git a/wscript b/wscript index 8d0a819..9297ea3 100644 --- a/wscript +++ b/wscript @@ -203,7 +203,7 @@ def configure(conf): elif conf.env.COMPILER_CC == 'owcc': pass else: - conf.env.append_unique('CXXFLAGS', ['-Wno-invalid-offsetof', '-fno-exceptions']) + conf.env.append_unique('CXXFLAGS', ['-Wno-invalid-offsetof']) conf.define('stricmp', 'strcasecmp', quote=False) conf.define('strnicmp', 'strncasecmp', quote=False) conf.define('_snprintf', 'snprintf', quote=False)