Skip to content

Commit

Permalink
Script: Fix squirrel export warning due to struct forward declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
JGRennison committed Oct 19, 2024
1 parent 9ff7fd8 commit 808b52c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/script/api/script_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#include <utility>

struct CommandAuxiliaryBase;

/**
* The callback function for Mode-classes.
*/
Expand Down Expand Up @@ -113,9 +111,9 @@ friend class TestScriptController;
/**
* Executes a raw DoCommand for the script.
*/
static bool DoCommandEx(TileIndex tile, uint32_t p1, uint32_t p2, uint64_t p3, uint cmd, const char *text = nullptr, const CommandAuxiliaryBase *aux_data = nullptr, Script_SuspendCallbackProc *callback = nullptr);
static bool DoCommandEx(TileIndex tile, uint32_t p1, uint32_t p2, uint64_t p3, uint cmd, const char *text = nullptr, const struct CommandAuxiliaryBase *aux_data = nullptr, Script_SuspendCallbackProc *callback = nullptr);

static bool DoCommandEx(TileIndex tile, uint32_t p1, uint32_t p2, uint64_t p3, uint cmd, const std::string &text, const CommandAuxiliaryBase *aux_data = nullptr, Script_SuspendCallbackProc *callback = nullptr)
static bool DoCommandEx(TileIndex tile, uint32_t p1, uint32_t p2, uint64_t p3, uint cmd, const std::string &text, const struct CommandAuxiliaryBase *aux_data = nullptr, Script_SuspendCallbackProc *callback = nullptr)
{
return ScriptObject::DoCommandEx(tile, p1, p2, p3, cmd, text.c_str(), aux_data, callback);
}
Expand All @@ -130,7 +128,7 @@ friend class TestScriptController;
return ScriptObject::DoCommandEx(tile, p1, p2, 0, cmd, text.c_str(), nullptr, callback);
}

static bool DoCommandAux(TileIndex tile, const CommandAuxiliaryBase *aux_data, uint cmd, Script_SuspendCallbackProc *callback = nullptr)
static bool DoCommandAux(TileIndex tile, const struct CommandAuxiliaryBase *aux_data, uint cmd, Script_SuspendCallbackProc *callback = nullptr)
{
return ScriptObject::DoCommandEx(tile, 0, 0, 0, cmd, nullptr, aux_data, callback);
}
Expand Down

0 comments on commit 808b52c

Please sign in to comment.