From bb6f857d462c56bbc3acde6a2fe109edb7f19443 Mon Sep 17 00:00:00 2001 From: somewhatlurker <52014015+somewhatlurker@users.noreply.github.com> Date: Wed, 21 Aug 2019 03:47:08 +1000 Subject: [PATCH] launcher: fix typeid checks --- source-code/source/plugins/Launcher/ConfigOption.h | 8 ++++---- source-code/source/plugins/Launcher/ui.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source-code/source/plugins/Launcher/ConfigOption.h b/source-code/source/plugins/Launcher/ConfigOption.h index 601b8c7..386a1e5 100644 --- a/source-code/source/plugins/Launcher/ConfigOption.h +++ b/source-code/source/plugins/Launcher/ConfigOption.h @@ -903,10 +903,10 @@ Panel^ MakePanel(int width, int height, std::vector cfg, Tool for (int i = 0; i < cfg.size(); i++) { - if (typeid(cfg[i]).hash_code() == typeid(OptionMetaGroupEnd).hash_code()) + if (typeid(*cfg[i]).hash_code() == typeid(OptionMetaGroupEnd).hash_code()) continue; - if (typeid(cfg[i]).hash_code() == typeid(OptionMetaGroupStart).hash_code()) + if (typeid(*cfg[i]).hash_code() == typeid(OptionMetaGroupStart).hash_code()) { OptionMetaGroupStart* groupData = (OptionMetaGroupStart*)(cfg[i]); GroupBox^ groupbox = gcnew GroupBox(); @@ -921,9 +921,9 @@ Panel^ MakePanel(int width, int height, std::vector cfg, Tool int endidx; for (endidx = i + 1; endidx < cfg.size(); endidx++) { - if (typeid(&cfg[endidx]).hash_code() == typeid(OptionMetaGroupStart).hash_code()) + if (typeid(*cfg[endidx]).hash_code() == typeid(OptionMetaGroupStart).hash_code()) level++; - if (typeid(&cfg[endidx]).hash_code() == typeid(OptionMetaGroupEnd).hash_code()) + if (typeid(*cfg[endidx]).hash_code() == typeid(OptionMetaGroupEnd).hash_code()) level--; if (level == 0) diff --git a/source-code/source/plugins/Launcher/ui.h b/source-code/source/plugins/Launcher/ui.h index 955dee7..2251521 100644 --- a/source-code/source/plugins/Launcher/ui.h +++ b/source-code/source/plugins/Launcher/ui.h @@ -122,7 +122,7 @@ namespace Launcher { using namespace PluginConfig; - //tabPage_Components->Controls->Add(MakePanel(256, 800, testcfg, toolTip1)); + //tabPage_Components->Controls->Add(MakePanel(256, 256, testcfgconfigopts, toolTip1)); tabPage_Components->Controls->Add(MakePanel(256, 100, std::vector(&componentsArray[0], &componentsArray[12]), toolTip1));