forked from rosebudai/OpenRCT2-Web
Merge pull request #26486 from mixiate/command-line-string-option-fix
Fix types of a couple of command line string options
This commit is contained in:
2 files changed
+3
-5
No files matched your search
@@ -46,7 +46,7 @@ namespace OpenRCT2
|
||||
std::string gNetworkStartAddress;
|
||||
|
||||
static uint32_t _port = 0;
|
||||
static char* _address = nullptr;
|
||||
static u8string _address;
|
||||
#endif
|
||||
|
||||
static bool _help = false;
|
||||
@@ -307,7 +307,7 @@ namespace OpenRCT2
|
||||
|
||||
gNetworkStart = Network::Mode::server;
|
||||
gNetworkStartPort = _port;
|
||||
gNetworkStartAddress = String::toStd(_address);
|
||||
gNetworkStartAddress = _address;
|
||||
|
||||
return EXITCODE_CONTINUE;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
#include "../../Context.h"
|
||||
#include "../../OpenRCT2.h"
|
||||
#include "../../core/Memory.hpp"
|
||||
#include "../../core/String.hpp"
|
||||
#include "../../drawing/Drawing.h"
|
||||
#include "../../object/ObjectFactory.h"
|
||||
@@ -36,7 +35,7 @@ namespace OpenRCT2::CommandLine::Sprite
|
||||
{
|
||||
using namespace OpenRCT2::Drawing;
|
||||
|
||||
static const char* _mode;
|
||||
static u8string _mode;
|
||||
|
||||
// clang-format off
|
||||
static constexpr CommandLineOptionDefinition kSpriteOptions[]
|
||||
@@ -70,7 +69,6 @@ namespace OpenRCT2::CommandLine::Sprite
|
||||
spriteMode = ImportMode::Closest;
|
||||
else if (String::iequals(_mode, SZ_DITHERING))
|
||||
spriteMode = ImportMode::Dithering;
|
||||
Memory::Free(_mode);
|
||||
|
||||
const char** argv = const_cast<const char**>(argEnumerator->GetArguments()) + argEnumerator->GetIndex() - 1;
|
||||
int32_t argc = argEnumerator->GetCount() - argEnumerator->GetIndex() + 1;
|
||||
|
||||
Reference in new issue
Block a user