mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-11 15:38:12 +00:00
Merge pull request #45 from FreeSlave/fix_warnings
Fix some warnings. Disable warning about invalid offsetof as it produ…
This commit is contained in:
commit
c64b300050
@ -54,6 +54,16 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# add_compile_options for older cmake versions
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.0.2")
|
||||
macro(add_compile_options)
|
||||
set(list_var "${ARGV}")
|
||||
foreach(arg IN LISTS list_var)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${arg}")
|
||||
endforeach()
|
||||
endmacro()
|
||||
endif()
|
||||
|
||||
if(BUILD_CLIENT)
|
||||
add_subdirectory(cl_dll)
|
||||
endif()
|
||||
|
@ -29,6 +29,7 @@ add_definitions(-DCLIENT_WEAPONS)
|
||||
|
||||
if(NOT MSVC)
|
||||
add_compile_options(-fno-exceptions) # GCC/Clang flag
|
||||
add_compile_options(-Wno-invalid-offsetof) # GCC/Clang flag
|
||||
add_definitions(-D_LINUX) # It seems enough for all non-Win32 systems
|
||||
add_definitions(-Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf )
|
||||
else()
|
||||
|
@ -1,4 +1,4 @@
|
||||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose: New version of the slider bar
|
||||
//
|
||||
@ -82,7 +82,7 @@ void CPlayerMonster :: HandleAnimEvent( MonsterEvent_t *pEvent )
|
||||
//=========================================================
|
||||
int CPlayerMonster::ISoundMask( void )
|
||||
{
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//=========================================================
|
||||
|
@ -219,7 +219,6 @@ private:
|
||||
bool _paintBorderEnabled;
|
||||
bool _paintBackgroundEnabled;
|
||||
bool _paintEnabled;
|
||||
friend class Panel;
|
||||
friend class App;
|
||||
friend class SurfaceBase;
|
||||
friend class Image;
|
||||
|
Loading…
Reference in New Issue
Block a user