Skip to content

Commit

Permalink
xrEngine/xr_ioc_cmd: move InvalidSyntax() impl to cpp
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Xottab-DUTY committed Mar 24, 2018
1 parent 1ad302d commit 18e998d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
15 changes: 14 additions & 1 deletion src/xrEngine/xr_ioc_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
#include "x_ray.h"
#include "XR_IOConsole.h"
#include "xr_ioc_cmd.h"
#include "xrSASH.h"

#include "cameramanager.h"
#include "CameraManager.h"
#include "Environment.h"
#include "xr_input.h"
#include "CustomHUD.h"
Expand All @@ -16,6 +17,18 @@
xr_vector<xr_token> vid_quality_token;

const xr_token vid_bpp_token[] = {{"16", 16}, {"32", 32}, {0, 0}};

void IConsole_Command::InvalidSyntax()
{
TInfo I;
Info(I);
Msg("~ Invalid syntax in call to '%s'", cName);
Msg("~ Valid arguments: %s", I);

g_SASH.OnConsoleInvalidSyntax(false, "~ Invalid syntax in call to '%s'", cName);
g_SASH.OnConsoleInvalidSyntax(true, "~ Valid arguments: %s", I);
}

//-----------------------------------------------------------------------

void IConsole_Command::add_to_LRU(shared_str const& arg)
Expand Down
12 changes: 1 addition & 11 deletions src/xrEngine/xr_ioc_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
Console->AddCommand(&x##cls); \
}

#include "xrSASH.h"
#include "xrCore/xrCore_benchmark_macros.h"
#include "xrCore/xr_token.h"

Expand Down Expand Up @@ -68,16 +67,7 @@ class ENGINE_API IConsole_Command
BENCH_SEC_SCRAMBLEVTBL3

LPCSTR Name() { return cName; }
void InvalidSyntax()
{
TInfo I;
Info(I);
Msg("~ Invalid syntax in call to '%s'", cName);
Msg("~ Valid arguments: %s", I);

g_SASH.OnConsoleInvalidSyntax(false, "~ Invalid syntax in call to '%s'", cName);
g_SASH.OnConsoleInvalidSyntax(true, "~ Valid arguments: %s", I);
}
void InvalidSyntax();
virtual void Execute(LPCSTR args) = 0;
virtual void Status(TStatus& S) { S[0] = 0; }
virtual void Info(TInfo& I) { xr_strcpy(I, "(no arguments)"); }
Expand Down

0 comments on commit 18e998d

Please sign in to comment.