Skip to content

Commit b70e7f0

Browse files
committed
Fixed Linux OB compiler errors
1 parent 45bf520 commit b70e7f0

File tree

8 files changed

+28
-93
lines changed

8 files changed

+28
-93
lines changed

src/core/modules/cvar/cvar_wrap_python.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,16 @@ void export_cvar_interface()
7676
)
7777

7878
.def("find_command_base",
79-
GET_METHOD(ConCommandBase *, ICvar, FindCommandBase, const char*),
79+
GET_METHOD(ConCommandBase *, ICvar, FindCommandBase, const char *),
8080
"Returns a CConCommandBase instance for the given command, if it exists",
81-
args("szName"),
81+
args("name"),
8282
reference_existing_object_policy()
8383
)
8484

8585
.def("find_var",
8686
GET_METHOD(ConVar*, ICvar, FindVar, const char *),
8787
"Returns a CConVar instance for the given cvar, if it exists",
88-
args("szName"),
88+
args("name"),
8989
reference_existing_object_policy()
9090
)
9191
;

src/core/modules/effects/effects_wrap.h

Lines changed: 0 additions & 66 deletions
This file was deleted.

src/core/modules/effects/effects_wrap_python.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,19 @@ void export_effects()
7777
&IPredictionSystem::SetSuppressEvent
7878
)
7979

80+
/*
81+
TODO: CBaseEntity
8082
.def("set_suppress_host",
8183
&IPredictionSystem::SetSuppressHost
8284
)
8385
84-
/*
8586
TODO: CBaseEntity
8687
.def("get_suppress_host",
8788
&IPredictionSystem::GetSuppressHost,
8889
reference_existing_object_policy()
8990
)
9091
*/
91-
92+
9293
.def("can_predict",
9394
&IPredictionSystem::CanPredict
9495
)
@@ -102,10 +103,12 @@ void export_effects()
102103
)
103104
.staticmethod("suppress_events")
104105

106+
/*
105107
.def("suppress_host_events",
106108
&IPredictionSystem::SuppressHostEvents
107109
)
108110
.staticmethod("suppress_host_events")
111+
*/
109112
;
110113

111114
// TODO: Rename?
@@ -180,4 +183,4 @@ void export_effects()
180183
;
181184

182185
def("get_effects_interface", make_getter(&effects, reference_existing_object_policy()));
183-
}
186+
}

src/core/modules/engine/eiface_wrap_python.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
#include "modules/export_main.h"
3636
#include "dt_send.h"
37+
#include "irecipientfilter.h"
3738
#include "server_class.h"
3839
#include "iscratchpad3d.h"
3940
#include "cdll_int.h"

src/core/modules/engine/engine1/eiface_wrap_python.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ void IVEngineServer_Visitor(T cls)
8080
)
8181
*/
8282
;
83-
}
83+
}

src/core/modules/entities/entities_wrap.h

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,6 @@ class CSendProp
7474
m_edict->StateChanged();
7575
}
7676

77-
template<>
78-
void Set(const char* szValue)
79-
{
80-
// Get the address of the string buffer.
81-
char* data_buffer = (char *)((char *)m_base_entity + m_prop_offset);
82-
83-
// Write the string to the buffer.
84-
V_strncpy(data_buffer, szValue, DT_MAX_STRING_BUFFERSIZE);
85-
86-
// Force a network update.
87-
m_edict->StateChanged();
88-
}
89-
9077
private:
9178
// Offset from the beginning of the network table that
9279
// this prop is located at.
@@ -102,4 +89,18 @@ class CSendProp
10289
SendProp* m_send_prop;
10390
};
10491

92+
// GCC doesn't allow inline template specialization...
93+
template<>
94+
inline void CSendProp::Set(const char* szValue)
95+
{
96+
// Get the address of the string buffer.
97+
char* data_buffer = (char *)((char *)m_base_entity + m_prop_offset);
98+
99+
// Write the string to the buffer.
100+
V_strncpy(data_buffer, szValue, DT_MAX_STRING_BUFFERSIZE);
101+
102+
// Force a network update.
103+
m_edict->StateChanged();
104+
}
105+
105106
#endif

src/core/modules/globals/globals_wrap_python.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@ void export_globals()
132132
"Network protocol."
133133
)
134134

135-
.def_readwrite("saved_data",
136-
&CGlobalVarsBase::pSaveData
137-
)
138-
139135
.NOT_IMPLEMENTED("is_remote_client")
140136
);
141137

@@ -194,4 +190,4 @@ void export_globals()
194190
);
195191

196192
def("get_globals", make_getter(&gpGlobals, reference_existing_object_policy()));
197-
}
193+
}

src/core/utility/wrap_macros.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ using namespace boost::python;
7878
// This macro returns the given overloaded method
7979
//---------------------------------------------------------------------------------
8080
#define GET_METHOD(return_type, class_name, method, ...) \
81-
static_cast< return_type(class_name::*)( ##__VA_ARGS__ ) >(&class_name::method)
81+
static_cast< return_type (class_name::*)( __VA_ARGS__ ) >(&class_name::method)
8282

8383
//---------------------------------------------------------------------------------
8484
// This macro returns the given overloaded function
8585
//---------------------------------------------------------------------------------
8686
#define GET_FUNCTION(return_type, function, ...) \
87-
static_cast< return_type(*)( ##__VA_ARGS__ ) >(&function)
87+
static_cast< return_type(*)( __VA_ARGS__ ) >(&function)
8888

8989
//---------------------------------------------------------------------------------
9090
// Use this to begin wrapping an enumeration.

0 commit comments

Comments
 (0)