Skip to content

Commit 451f9d7

Browse files
committed
fix Windows build: forward-declare CBasePlayer, raw regex string
MSVC processes imovehelper.h before CBasePlayer is declared by the SDK headers. Added class CBasePlayer forward declaration in snipe_task.cpp to fix error C2061. Also fixed Python SyntaxWarning in AMBuildScript by using a raw string for the regex pattern.
1 parent a5b93fa commit 451f9d7

6 files changed

Lines changed: 7 additions & 1 deletion

File tree

AMBuildScript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class MMSConfig(object):
132132
import re
133133
with open(os.path.join(builder.sourcePath, 'product.version'), 'r') as fp:
134134
productContents = fp.read()
135-
m = re.match('(\d+)\.(\d+)\.(\d+).*', productContents)
135+
m = re.match(r'(\d+)\.(\d+)\.(\d+).*', productContents)
136136
if m == None:
137137
self.productVersion = '1.0.0'
138138
else:

rcbot2/botutil/base_task.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#include "bot.h"
44
#include "bot_const.h"
55

6+
class CBasePlayer;
7+
68
class CBotSchedule;
79

810
class IBotTaskInterrupt

rcbot2/botutil/hl2dm/gravgun_pickup_task.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
class CBasePlayer;
12
#include "gravgun_pickup_task.h"
23

34
#include "bot_getprop.h"

rcbot2/botutil/hl2dm/snipe_task.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
class CBasePlayer;
12
#include "snipe_task.h"
23

34
#include "bot_getprop.h"

rcbot2/botutil/hl2dm/use_button_task.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
class CBasePlayer;
12
#include "use_button_task.h"
23

34
#include "bot_globals.h"

rcbot2/botutil/hl2dm/use_charger_task.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
class CBasePlayer;
12
#include "use_charger_task.h"
23

34
#include "bot_getprop.h"

0 commit comments

Comments
 (0)