Skip to content

Commit 18e998d

Browse files
committed
xrEngine/xr_ioc_cmd: move InvalidSyntax() impl to cpp
Needed to prevent inclusion of xrSASH, which tries to include OpenAutomate.h and fails when path to it is not set in the project file
1 parent 1ad302d commit 18e998d

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

src/xrEngine/xr_ioc_cmd.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
#include "x_ray.h"
55
#include "XR_IOConsole.h"
66
#include "xr_ioc_cmd.h"
7+
#include "xrSASH.h"
78

8-
#include "cameramanager.h"
9+
#include "CameraManager.h"
910
#include "Environment.h"
1011
#include "xr_input.h"
1112
#include "CustomHUD.h"
@@ -16,6 +17,18 @@
1617
xr_vector<xr_token> vid_quality_token;
1718

1819
const xr_token vid_bpp_token[] = {{"16", 16}, {"32", 32}, {0, 0}};
20+
21+
void IConsole_Command::InvalidSyntax()
22+
{
23+
TInfo I;
24+
Info(I);
25+
Msg("~ Invalid syntax in call to '%s'", cName);
26+
Msg("~ Valid arguments: %s", I);
27+
28+
g_SASH.OnConsoleInvalidSyntax(false, "~ Invalid syntax in call to '%s'", cName);
29+
g_SASH.OnConsoleInvalidSyntax(true, "~ Valid arguments: %s", I);
30+
}
31+
1932
//-----------------------------------------------------------------------
2033

2134
void IConsole_Command::add_to_LRU(shared_str const& arg)

src/xrEngine/xr_ioc_cmd.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
Console->AddCommand(&x##cls); \
2727
}
2828

29-
#include "xrSASH.h"
3029
#include "xrCore/xrCore_benchmark_macros.h"
3130
#include "xrCore/xr_token.h"
3231

@@ -68,16 +67,7 @@ class ENGINE_API IConsole_Command
6867
BENCH_SEC_SCRAMBLEVTBL3
6968

7069
LPCSTR Name() { return cName; }
71-
void InvalidSyntax()
72-
{
73-
TInfo I;
74-
Info(I);
75-
Msg("~ Invalid syntax in call to '%s'", cName);
76-
Msg("~ Valid arguments: %s", I);
77-
78-
g_SASH.OnConsoleInvalidSyntax(false, "~ Invalid syntax in call to '%s'", cName);
79-
g_SASH.OnConsoleInvalidSyntax(true, "~ Valid arguments: %s", I);
80-
}
70+
void InvalidSyntax();
8171
virtual void Execute(LPCSTR args) = 0;
8272
virtual void Status(TStatus& S) { S[0] = 0; }
8373
virtual void Info(TInfo& I) { xr_strcpy(I, "(no arguments)"); }

0 commit comments

Comments
 (0)