Merge branch 'master' into jgrpp
# Conflicts: # cmake/CompileFlags.cmake # src/3rdparty/squirrel/squirrel/sqclosure.h # src/3rdparty/squirrel/squirrel/sqobject.h # src/3rdparty/squirrel/squirrel/sqvm.h # src/aircraft.h # src/airport_gui.cpp # src/blitter/32bpp_sse_func.hpp # src/blitter/null.hpp # src/bridge_gui.cpp # src/build_vehicle_gui.cpp # src/cargotype.h # src/cheat_gui.cpp # src/command.cpp # src/command_func.h # src/company_gui.cpp # src/console_gui.cpp # src/date_gui.cpp # src/depot_gui.cpp # src/dock_gui.cpp # src/economy.cpp # src/error_gui.cpp # src/fileio.cpp # src/fios.cpp # src/fios_gui.cpp # src/fontcache/spritefontcache.h # src/framerate_gui.cpp # src/game/game_text.cpp # src/gamelog.cpp # src/genworld_gui.cpp # src/gfx_layout_fallback.cpp # src/group_gui.cpp # src/highscore_gui.cpp # src/hotkeys.cpp # src/industry_cmd.cpp # src/industry_gui.cpp # src/landscape.cpp # src/main_gui.cpp # src/misc_cmd.cpp # src/misc_gui.cpp # src/network/core/tcp_game.cpp # src/network/core/udp.cpp # src/network/network_chat_gui.cpp # src/network/network_content_gui.cpp # src/network/network_gui.cpp # src/network/network_server.cpp # src/network/network_server.h # src/newgrf_airport.cpp # src/newgrf_airport.h # src/newgrf_airporttiles.cpp # src/newgrf_airporttiles.h # src/newgrf_animation_base.h # src/newgrf_canal.cpp # src/newgrf_commons.h # src/newgrf_config.cpp # src/newgrf_debug_gui.cpp # src/newgrf_engine.cpp # src/newgrf_engine.h # src/newgrf_generic.cpp # src/newgrf_gui.cpp # src/newgrf_house.cpp # src/newgrf_house.h # src/newgrf_industries.cpp # src/newgrf_industries.h # src/newgrf_industrytiles.cpp # src/newgrf_industrytiles.h # src/newgrf_object.cpp # src/newgrf_object.h # src/newgrf_railtype.cpp # src/newgrf_railtype.h # src/newgrf_roadstop.cpp # src/newgrf_roadstop.h # src/newgrf_roadtype.cpp # src/newgrf_roadtype.h # src/newgrf_spritegroup.cpp # src/newgrf_spritegroup.h # src/newgrf_station.cpp # src/newgrf_station.h # src/newgrf_town.cpp # src/newgrf_town.h # src/news_gui.cpp # src/object_gui.cpp # src/order_gui.cpp # src/os/macosx/crashlog_osx.cpp # src/os/unix/crashlog_unix.cpp # src/os/windows/crashlog_win.cpp # src/os/windows/win32.cpp # src/os/windows/win32_main.cpp # src/pathfinder/npf/npf.cpp # src/pathfinder/npf/queue.cpp # src/rail_cmd.cpp # src/rail_gui.cpp # src/road_gui.cpp # src/roadveh.h # src/saveload/saveload.cpp # src/screenshot.cpp # src/script/api/script_text.hpp # src/settings.cpp # src/settings_gui.cpp # src/settings_internal.h # src/settings_table.cpp # src/signs_cmd.cpp # src/signs_gui.cpp # src/smallmap_gui.cpp # src/smallmap_gui.h # src/spriteloader/grf.hpp # src/station_cmd.cpp # src/station_gui.cpp # src/station_map.h # src/statusbar_gui.cpp # src/stdafx.h # src/strgen/strgen.cpp # src/table/newgrf_debug_data.h # src/terraform_gui.cpp # src/timer/timer_game_calendar.cpp # src/timer/timer_window.cpp # src/town.h # src/town_cmd.cpp # src/town_gui.cpp # src/train_gui.cpp # src/transparency_gui.cpp # src/vehicle_gui.cpp # src/water_cmd.cpp # src/waypoint_cmd.cpp # src/widget.cpp # src/widget_type.h # src/widgets/dropdown.cpp # src/widgets/rail_widget.h # src/widgets/terraform_widget.h # src/window.cpp # src/window_gui.h
This commit is contained in:
@@ -57,7 +57,7 @@ public:
|
||||
/**
|
||||
* @api -all
|
||||
*/
|
||||
virtual void FinalRelease();
|
||||
void FinalRelease() override;
|
||||
};
|
||||
|
||||
#endif /* SCRIPT_ASYNCMODE_HPP */
|
||||
|
@@ -18,7 +18,7 @@
|
||||
return ScriptObject::GetRandomizer().Next();
|
||||
}
|
||||
|
||||
/* static */ SQInteger ScriptBase::RandItem(SQInteger unused_param)
|
||||
/* static */ SQInteger ScriptBase::RandItem(SQInteger)
|
||||
{
|
||||
return ScriptBase::Rand();
|
||||
}
|
||||
@@ -29,7 +29,7 @@
|
||||
return ScriptObject::GetRandomizer().Next(max);
|
||||
}
|
||||
|
||||
/* static */ SQInteger ScriptBase::RandRangeItem(SQInteger unused_param, SQInteger max)
|
||||
/* static */ SQInteger ScriptBase::RandRangeItem(SQInteger, SQInteger max)
|
||||
{
|
||||
return ScriptBase::RandRange(max);
|
||||
}
|
||||
@@ -42,7 +42,7 @@
|
||||
return ScriptBase::RandRange(max) < out;
|
||||
}
|
||||
|
||||
/* static */ bool ScriptBase::ChanceItem(SQInteger unused_param, SQInteger out, SQInteger max)
|
||||
/* static */ bool ScriptBase::ChanceItem(SQInteger, SQInteger out, SQInteger max)
|
||||
{
|
||||
return ScriptBase::Chance(out, max);
|
||||
}
|
||||
|
@@ -48,7 +48,7 @@ public:
|
||||
/**
|
||||
* @api -all
|
||||
*/
|
||||
virtual void FinalRelease();
|
||||
void FinalRelease() override;
|
||||
};
|
||||
|
||||
#endif /* SCRIPT_EXECMODE_HPP */
|
||||
|
@@ -113,7 +113,7 @@ public:
|
||||
this->End();
|
||||
}
|
||||
|
||||
SQInteger Begin()
|
||||
SQInteger Begin() override
|
||||
{
|
||||
if (this->list->values.empty()) return 0;
|
||||
this->has_no_more_items = false;
|
||||
@@ -126,7 +126,7 @@ public:
|
||||
return item_current;
|
||||
}
|
||||
|
||||
void End()
|
||||
void End() override
|
||||
{
|
||||
this->has_no_more_items = true;
|
||||
this->item_next = 0;
|
||||
@@ -145,7 +145,7 @@ public:
|
||||
if (this->value_iter != this->list->values.end()) item_next = (*this->value_iter).second;
|
||||
}
|
||||
|
||||
SQInteger Next()
|
||||
SQInteger Next() override
|
||||
{
|
||||
if (this->IsEnd()) return 0;
|
||||
|
||||
@@ -154,7 +154,7 @@ public:
|
||||
return item_current;
|
||||
}
|
||||
|
||||
void Remove(SQInteger item)
|
||||
void Remove(SQInteger item) override
|
||||
{
|
||||
if (this->IsEnd()) return;
|
||||
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void PostErase(SQInteger item, ScriptList::ScriptListMap::iterator post_erase, ScriptList::ScriptListValueSet::iterator value_post_erase)
|
||||
void PostErase(SQInteger item, ScriptList::ScriptListMap::iterator post_erase, ScriptList::ScriptListValueSet::iterator value_post_erase) override
|
||||
{
|
||||
if (this->IsEnd()) return;
|
||||
|
||||
@@ -178,12 +178,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void ValueChange(SQInteger item)
|
||||
void ValueChange(SQInteger item) override
|
||||
{
|
||||
this->ScriptListSorterValueAscending::Remove(item);
|
||||
}
|
||||
|
||||
void RetargetIterators()
|
||||
void RetargetIterators() override
|
||||
{
|
||||
RetargetIterator(this->list->values, this->value_iter);
|
||||
}
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
this->End();
|
||||
}
|
||||
|
||||
SQInteger Begin()
|
||||
SQInteger Begin() override
|
||||
{
|
||||
if (this->list->values.empty()) return 0;
|
||||
this->has_no_more_items = false;
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
return item_current;
|
||||
}
|
||||
|
||||
void End()
|
||||
void End() override
|
||||
{
|
||||
this->has_no_more_items = true;
|
||||
this->item_next = 0;
|
||||
@@ -248,7 +248,7 @@ public:
|
||||
if (this->value_iter != this->list->values.end()) item_next = this->value_iter->second;
|
||||
}
|
||||
|
||||
SQInteger Next()
|
||||
SQInteger Next() override
|
||||
{
|
||||
if (this->IsEnd()) return 0;
|
||||
|
||||
@@ -257,7 +257,7 @@ public:
|
||||
return item_current;
|
||||
}
|
||||
|
||||
void Remove(SQInteger item)
|
||||
void Remove(SQInteger item) override
|
||||
{
|
||||
if (this->IsEnd()) return;
|
||||
|
||||
@@ -268,17 +268,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void PostErase(SQInteger item, ScriptList::ScriptListMap::iterator post_erase, ScriptList::ScriptListValueSet::iterator value_post_erase)
|
||||
void PostErase(SQInteger item, ScriptList::ScriptListMap::iterator post_erase, ScriptList::ScriptListValueSet::iterator value_post_erase) override
|
||||
{
|
||||
/* not implemented */
|
||||
}
|
||||
|
||||
void ValueChange(SQInteger item)
|
||||
void ValueChange(SQInteger item) override
|
||||
{
|
||||
this->ScriptListSorterValueDescending::Remove(item);
|
||||
}
|
||||
|
||||
void RetargetIterators()
|
||||
void RetargetIterators() override
|
||||
{
|
||||
RetargetIterator(this->list->values, this->value_iter);
|
||||
}
|
||||
@@ -302,7 +302,7 @@ public:
|
||||
this->End();
|
||||
}
|
||||
|
||||
SQInteger Begin()
|
||||
SQInteger Begin() override
|
||||
{
|
||||
if (this->list->items.empty()) return 0;
|
||||
this->has_no_more_items = false;
|
||||
@@ -315,7 +315,7 @@ public:
|
||||
return item_current;
|
||||
}
|
||||
|
||||
void End()
|
||||
void End() override
|
||||
{
|
||||
this->has_no_more_items = true;
|
||||
}
|
||||
@@ -333,7 +333,7 @@ public:
|
||||
if (this->item_iter != this->list->items.end()) item_next = (*this->item_iter).first;
|
||||
}
|
||||
|
||||
SQInteger Next()
|
||||
SQInteger Next() override
|
||||
{
|
||||
if (this->IsEnd()) return 0;
|
||||
|
||||
@@ -342,7 +342,7 @@ public:
|
||||
return item_current;
|
||||
}
|
||||
|
||||
void Remove(SQInteger item)
|
||||
void Remove(SQInteger item) override
|
||||
{
|
||||
if (this->IsEnd()) return;
|
||||
|
||||
@@ -353,7 +353,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void PostErase(SQInteger item, ScriptList::ScriptListMap::iterator post_erase, ScriptList::ScriptListValueSet::iterator value_post_erase)
|
||||
void PostErase(SQInteger item, ScriptList::ScriptListMap::iterator post_erase, ScriptList::ScriptListValueSet::iterator value_post_erase) override
|
||||
{
|
||||
if (this->IsEnd()) return;
|
||||
|
||||
@@ -366,12 +366,12 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void ValueChange(SQInteger item)
|
||||
void ValueChange(SQInteger item) override
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
void RetargetIterators()
|
||||
void RetargetIterators() override
|
||||
{
|
||||
RetargetIterator(this->list->items, this->item_iter);
|
||||
}
|
||||
@@ -398,7 +398,7 @@ public:
|
||||
this->End();
|
||||
}
|
||||
|
||||
SQInteger Begin()
|
||||
SQInteger Begin() override
|
||||
{
|
||||
if (this->list->items.empty()) return 0;
|
||||
this->has_no_more_items = false;
|
||||
@@ -412,7 +412,7 @@ public:
|
||||
return item_current;
|
||||
}
|
||||
|
||||
void End()
|
||||
void End() override
|
||||
{
|
||||
this->has_no_more_items = true;
|
||||
}
|
||||
@@ -435,7 +435,7 @@ public:
|
||||
if (this->item_iter != this->list->items.end()) item_next = (*this->item_iter).first;
|
||||
}
|
||||
|
||||
SQInteger Next()
|
||||
SQInteger Next() override
|
||||
{
|
||||
if (this->IsEnd()) return 0;
|
||||
|
||||
@@ -444,7 +444,7 @@ public:
|
||||
return item_current;
|
||||
}
|
||||
|
||||
void Remove(SQInteger item)
|
||||
void Remove(SQInteger item) override
|
||||
{
|
||||
if (this->IsEnd()) return;
|
||||
|
||||
@@ -455,17 +455,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void PostErase(SQInteger item, ScriptList::ScriptListMap::iterator post_erase, ScriptList::ScriptListValueSet::iterator value_post_erase)
|
||||
void PostErase(SQInteger item, ScriptList::ScriptListMap::iterator post_erase, ScriptList::ScriptListValueSet::iterator value_post_erase) override
|
||||
{
|
||||
/* not implemented */
|
||||
}
|
||||
|
||||
void ValueChange(SQInteger item)
|
||||
void ValueChange(SQInteger item) override
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
void RetargetIterators()
|
||||
void RetargetIterators() override
|
||||
{
|
||||
RetargetIterator(this->list->items, this->item_iter);
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ public:
|
||||
/**
|
||||
* @api -all
|
||||
*/
|
||||
virtual void FinalRelease();
|
||||
void FinalRelease() override;
|
||||
};
|
||||
|
||||
#endif /* SCRIPT_TESTMODE_HPP */
|
||||
|
@@ -125,7 +125,7 @@ public:
|
||||
/**
|
||||
* @api -all
|
||||
*/
|
||||
virtual const std::string GetEncodedText();
|
||||
const std::string GetEncodedText() override;
|
||||
|
||||
private:
|
||||
using ScriptTextRef = ScriptObjectRef<ScriptText>;
|
||||
|
@@ -103,7 +103,7 @@ struct ScriptListWindow : public Window {
|
||||
SetDParam(0, (this->slot == OWNER_DEITY) ? STR_AI_LIST_CAPTION_GAMESCRIPT : STR_AI_LIST_CAPTION_AI);
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||
void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
||||
{
|
||||
if (widget != WID_SCRL_LIST) return;
|
||||
|
||||
@@ -191,7 +191,7 @@ struct ScriptListWindow : public Window {
|
||||
}
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_SCRL_LIST: { // Select one of the Scripts
|
||||
@@ -229,7 +229,7 @@ struct ScriptListWindow : public Window {
|
||||
* @param data Information about the changed data.
|
||||
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
|
||||
*/
|
||||
void OnInvalidateData(int data = 0, bool gui_scope = true) override
|
||||
void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
|
||||
{
|
||||
if (_game_mode == GM_NORMAL && Company::IsValidID(this->slot)) {
|
||||
this->Close();
|
||||
@@ -357,7 +357,7 @@ struct ScriptSettingsWindow : public Window {
|
||||
SetDParam(0, (this->slot == OWNER_DEITY) ? STR_AI_SETTINGS_CAPTION_GAMESCRIPT : STR_AI_SETTINGS_CAPTION_AI);
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||
void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
||||
{
|
||||
if (widget != WID_SCRS_BACKGROUND) return;
|
||||
|
||||
@@ -436,7 +436,7 @@ struct ScriptSettingsWindow : public Window {
|
||||
this->DrawWidgets();
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_SCRS_BACKGROUND: {
|
||||
@@ -487,7 +487,7 @@ struct ScriptSettingsWindow : public Window {
|
||||
list.emplace_back(new DropDownListStringItem(config_item.labels.find(i)->second, i, false));
|
||||
}
|
||||
|
||||
ShowDropDownListAt(this, std::move(list), old_val, -1, wi_rect, COLOUR_ORANGE);
|
||||
ShowDropDownListAt(this, std::move(list), old_val, WID_SCRS_SETTING_DROPDOWN, wi_rect, COLOUR_ORANGE);
|
||||
}
|
||||
}
|
||||
} else if (IsInsideMM(x, 0, SETTING_BUTTON_WIDTH)) {
|
||||
@@ -541,12 +541,14 @@ struct ScriptSettingsWindow : public Window {
|
||||
|
||||
void OnDropdownSelect(int widget, int index) override
|
||||
{
|
||||
if (widget != WID_SCRS_SETTING_DROPDOWN) return;
|
||||
assert(this->clicked_dropdown);
|
||||
SetValue(index);
|
||||
}
|
||||
|
||||
void OnDropdownClose(Point pt, int widget, int index, bool instant_close) override
|
||||
void OnDropdownClose(Point, int widget, int, bool) override
|
||||
{
|
||||
if (widget != WID_SCRS_SETTING_DROPDOWN) return;
|
||||
/* We cannot raise the dropdown button just yet. OnClick needs some hint, whether
|
||||
* the same dropdown button was clicked again, and then not open the dropdown again.
|
||||
* So, we only remember that it was closed, and process it on the next OnPaint, which is
|
||||
@@ -574,7 +576,7 @@ struct ScriptSettingsWindow : public Window {
|
||||
* @param data Information about the changed data.
|
||||
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
|
||||
*/
|
||||
void OnInvalidateData(int data = 0, bool gui_scope = true) override
|
||||
void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
|
||||
{
|
||||
this->RebuildVisibleSettings();
|
||||
HideDropDownMenu(this);
|
||||
@@ -657,7 +659,7 @@ struct ScriptTextfileWindow : public TextfileWindow {
|
||||
}
|
||||
}
|
||||
|
||||
void OnInvalidateData(int data = 0, bool gui_scope = true) override
|
||||
void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
|
||||
{
|
||||
const char *textfile = GetConfig(slot)->GetTextfile(file_type, slot);
|
||||
if (textfile == nullptr) {
|
||||
@@ -796,7 +798,7 @@ struct ScriptDebugWindow : public Window {
|
||||
|
||||
this->querystrings[WID_SCRD_BREAK_STR_EDIT_BOX] = &this->break_editbox;
|
||||
|
||||
SetWidgetsDisabledState(!this->show_break_box, WID_SCRD_BREAK_STR_ON_OFF_BTN, WID_SCRD_BREAK_STR_EDIT_BOX, WID_SCRD_MATCH_CASE_BTN, WIDGET_LIST_END);
|
||||
SetWidgetsDisabledState(!this->show_break_box, WID_SCRD_BREAK_STR_ON_OFF_BTN, WID_SCRD_BREAK_STR_EDIT_BOX, WID_SCRD_MATCH_CASE_BTN);
|
||||
|
||||
/* Restore the break string value from static variable */
|
||||
this->break_editbox.text.Assign(this->break_string);
|
||||
@@ -805,7 +807,7 @@ struct ScriptDebugWindow : public Window {
|
||||
this->InvalidateData(-1);
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||
void UpdateWidgetSize(int widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
||||
{
|
||||
if (widget == WID_SCRD_LOG_PANEL) {
|
||||
resize->height = FONT_HEIGHT_NORMAL + WidgetDimensions::scaled.vsep_normal;
|
||||
@@ -965,7 +967,7 @@ struct ScriptDebugWindow : public Window {
|
||||
this->last_vscroll_pos = this->vscroll->GetPosition();
|
||||
}
|
||||
|
||||
void OnClick(Point pt, int widget, int click_count) override
|
||||
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
/* Also called for hotkeys, so check for disabledness */
|
||||
if (this->IsWidgetDisabled(widget)) return;
|
||||
@@ -1056,7 +1058,7 @@ struct ScriptDebugWindow : public Window {
|
||||
* This is the company ID of the AI/GS which wrote a new log message, or -1 in other cases.
|
||||
* @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
|
||||
*/
|
||||
void OnInvalidateData(int data = 0, bool gui_scope = true) override
|
||||
void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
|
||||
{
|
||||
/* If the log message is related to the active company tab, check the break string.
|
||||
* This needs to be done in gameloop-scope, so the AI is suspended immediately. */
|
||||
|
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
bool ScriptScanner::AddFile(const std::string &filename, size_t basepath_length, const std::string &tar_filename)
|
||||
bool ScriptScanner::AddFile(const std::string &filename, size_t, const std::string &tar_filename)
|
||||
{
|
||||
this->main_script = filename;
|
||||
this->tar_file = tar_filename;
|
||||
@@ -165,7 +165,7 @@ struct ScriptFileChecksumCreator : FileScanner {
|
||||
ScriptFileChecksumCreator(Subdirectory dir) : dir(dir) {}
|
||||
|
||||
/* Add the file and calculate the md5 sum. */
|
||||
virtual bool AddFile(const std::string &filename, size_t basepath_length, const std::string &tar_filename)
|
||||
bool AddFile(const std::string &filename, size_t, const std::string &) override
|
||||
{
|
||||
Md5 checksum;
|
||||
uint8 buffer[1024];
|
||||
|
@@ -131,7 +131,7 @@ namespace SQConvert {
|
||||
|
||||
private:
|
||||
template <size_t... i>
|
||||
static int SQCall(void *instance, Tretval(*func)(Targs...), [[maybe_unused]] HSQUIRRELVM vm, std::index_sequence<i...>)
|
||||
static int SQCall(void *, Tretval(*func)(Targs...), [[maybe_unused]] HSQUIRRELVM vm, std::index_sequence<i...>)
|
||||
{
|
||||
if constexpr (std::is_void_v<Tretval>) {
|
||||
(*func)(
|
||||
@@ -180,7 +180,7 @@ namespace SQConvert {
|
||||
}
|
||||
|
||||
template <size_t... i>
|
||||
static Tcls *SQConstruct(Tcls *, Tretval(Tcls:: *func)(Targs...), [[maybe_unused]] HSQUIRRELVM vm, std::index_sequence<i...>)
|
||||
static Tcls *SQConstruct(Tcls *, Tretval(Tcls:: *)(Targs...), [[maybe_unused]] HSQUIRRELVM vm, std::index_sequence<i...>)
|
||||
{
|
||||
Tcls *inst = new Tcls(
|
||||
Param<Targs>::Get(vm, 2 + i)...
|
||||
@@ -321,7 +321,7 @@ namespace SQConvert {
|
||||
* here as it has to be in the same scope as DefSQConstructorCallback.
|
||||
*/
|
||||
template <typename Tcls>
|
||||
static SQInteger DefSQDestructorCallback(SQUserPointer p, SQInteger size)
|
||||
static SQInteger DefSQDestructorCallback(SQUserPointer p, SQInteger)
|
||||
{
|
||||
/* Remove the real instance too */
|
||||
if (p != nullptr) ((Tcls *)p)->Release();
|
||||
|
Reference in New Issue
Block a user