launcher: fix typeid checks

This commit is contained in:
somewhatlurker
2019-08-30 00:16:33 +10:00
parent f46f6a4d17
commit bb6f857d46
2 changed files with 5 additions and 5 deletions
@@ -903,10 +903,10 @@ Panel^ MakePanel(int width, int height, std::vector<ConfigOptionBase*> 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<ConfigOptionBase*> 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)
+1 -1
View File
@@ -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<ConfigOptionBase*>(&componentsArray[0], &componentsArray[12]), toolTip1));