mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2024-12-02 08:51:57 +00:00
Use -O0 for Debug builds, make sure that compiles
because of some GCC bug the included refactoring in PacketProcessor.* was necessary
This commit is contained in:
parent
67d6a5a1fa
commit
a5f5d75e82
3 changed files with 23 additions and 8 deletions
|
@ -32,7 +32,7 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
|||
add_definitions(-DUSE_EXCEPTIONS)
|
||||
#endif()
|
||||
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -O1 -Wno-pragmas -fno-strict-aliasing -Wno-unused-variable -Wno-unused-but-set-variable -Wno-switch")
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -O0 -ggdb -Wno-pragmas -fno-strict-aliasing -Wno-unused-variable -Wno-unused-but-set-variable -Wno-switch")
|
||||
#set(CMAKE_C_FLAGS_DEBUGALL "${CMAKE_C_FLAGS_DEBUGALL} -g -ggdb -D_DEBUG -Wno-pragmas -fno-strict-aliasing -Wno-unused-variable -Wno-unused-but-set-variable -Wno-switch")
|
||||
#set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE} -g -ggdb -D_DEBUG -O1 -fno-omit-frame-pointer -Wunknown-pragmas -fno-strict-aliasing -Wno-unused-variable -Wno-unused-but-set-variable -Wno-switch")
|
||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -ffast-math -fno-unsafe-math-optimizations -fomit-frame-pointer -Wno-pragmas -fno-strict-aliasing -Wno-unused-variable -Wno-unused-but-set-variable -Wno-switch")
|
||||
|
|
|
@ -28,6 +28,17 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
#pragma hdrstop
|
||||
#include "../idlib/precompiled.h"
|
||||
#include "PacketProcessor.h"
|
||||
|
||||
// DG: workaround for GCC bug
|
||||
const int idPacketProcessor::RETURN_TYPE_NONE = 0;
|
||||
const int idPacketProcessor::RETURN_TYPE_OOB = 1;
|
||||
const int idPacketProcessor::RETURN_TYPE_INBAND = 2;
|
||||
|
||||
const int idPacketProcessor::FRAGMENT_START = 0;
|
||||
const int idPacketProcessor::FRAGMENT_MIDDLE = 1;
|
||||
const int idPacketProcessor::FRAGMENT_END = 2;
|
||||
// DG end
|
||||
|
||||
idCVar net_maxRate( "net_maxRate", "50", CVAR_INTEGER, "max send rate in kilobytes per second" );
|
||||
|
||||
|
|
|
@ -36,10 +36,11 @@ idPacketProcessor
|
|||
class idPacketProcessor
|
||||
{
|
||||
public:
|
||||
static const int RETURN_TYPE_NONE = 0;
|
||||
static const int RETURN_TYPE_OOB = 1;
|
||||
static const int RETURN_TYPE_INBAND = 2;
|
||||
|
||||
// DG: workaround for GCC bug (can't link when compiling with -O0): put definitions in PacketProcessor.cpp
|
||||
static const int RETURN_TYPE_NONE; // = 0;
|
||||
static const int RETURN_TYPE_OOB; // = 1;
|
||||
static const int RETURN_TYPE_INBAND; // = 2;
|
||||
// DG end
|
||||
typedef uint16 sessionId_t;
|
||||
|
||||
static const int NUM_LOBBY_TYPE_BITS = 2;
|
||||
|
@ -229,10 +230,13 @@ private:
|
|||
static const int PACKET_TYPE_RELIABLE_ACK = 2; // Header type used to piggy-back on top of msgs to ack reliable msg's
|
||||
static const int PACKET_TYPE_FRAGMENTED = 3; // The msg is fragmented, fragment type stored in the userData portion of header
|
||||
|
||||
|
||||
// PACKET_TYPE_FRAGMENTED userData values
|
||||
static const int FRAGMENT_START = 0;
|
||||
static const int FRAGMENT_MIDDLE = 1;
|
||||
static const int FRAGMENT_END = 2;
|
||||
// DG: workaround for GCC bug (can't link when compiling with -O0): put definitions in PacketProcessor.cpp
|
||||
static const int FRAGMENT_START; // = 0;
|
||||
static const int FRAGMENT_MIDDLE; // = 1;
|
||||
static const int FRAGMENT_END; // = 2;
|
||||
// DG end
|
||||
|
||||
class idOuterPacketHeader
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue