From 424ae745042a1a8d30c286be10b586a9bd3b9411 Mon Sep 17 00:00:00 2001 From: glx22 Date: Fri, 10 Feb 2023 17:37:18 +0100 Subject: [PATCH] Codechange: Use SQInteger for generic numbers in script_companymode --- src/script/api/script_companymode.cpp | 4 ++-- src/script/api/script_companymode.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/script/api/script_companymode.cpp b/src/script/api/script_companymode.cpp index 83beec5ebb..a15d6f45d2 100644 --- a/src/script/api/script_companymode.cpp +++ b/src/script/api/script_companymode.cpp @@ -13,13 +13,13 @@ #include "../../safeguards.h" -ScriptCompanyMode::ScriptCompanyMode(int company) +ScriptCompanyMode::ScriptCompanyMode(SQInteger company) { if (company < OWNER_BEGIN || company >= MAX_COMPANIES) company = INVALID_COMPANY; if (!::Company::IsValidID(company)) company = INVALID_COMPANY; this->last_company = ScriptObject::GetCompany(); - ScriptObject::SetCompany((CompanyID)company); + ScriptObject::SetCompany((::CompanyID)company); } ScriptCompanyMode::~ScriptCompanyMode() diff --git a/src/script/api/script_companymode.hpp b/src/script/api/script_companymode.hpp index e00cc7bfb0..c64fdcb08a 100644 --- a/src/script/api/script_companymode.hpp +++ b/src/script/api/script_companymode.hpp @@ -40,7 +40,7 @@ public: * @note When the instance is destroyed, it restores the company that was * current when the instance was created! */ - ScriptCompanyMode(int company); + ScriptCompanyMode(SQInteger company); /** * Destroying this instance reset the company to that what it was