File tree Expand file tree Collapse file tree 1 file changed +13
-16
lines changed Expand file tree Collapse file tree 1 file changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -588,25 +588,22 @@ bool Cppyy::AppendTypesSlow(const std::string& name,
588
588
589
589
for (std::string& i : individual_types) {
590
590
// Try going via Cppyy::GetType first.
591
- if (Cppyy::TCppType_t type = GetType (i, /* enable_slow_lookup=*/ true )) {
592
- const char * integral_value = nullptr ;
593
- if (is_integral (i))
594
- integral_value = strdup (i.c_str ());
595
- types.emplace_back (type, integral_value);
596
- } else if (parent && (Cpp::IsNamespace (parent) || Cpp::IsClass (parent))) {
597
- if (Cppyy::TCppType_t type = Cppyy::GetTypeFromScope (Cppyy::GetNamed (name, parent))) {
598
- const char * integral_value = nullptr ;
599
- if (is_integral (i))
600
- integral_value = strdup (i.c_str ());
601
- types.emplace_back (type, integral_value);
602
- } else {
603
- types.clear ();
604
- return true ;
605
- }
606
- } else {
591
+ const char * integral_value = nullptr ;
592
+ Cppyy::TCppType_t type = nullptr ;
593
+
594
+ type = GetType (i, /* enable_slow_lookup=*/ true );
595
+ if (!type && parent && (Cpp::IsNamespace (parent) || Cpp::IsClass (parent))) {
596
+ type = Cppyy::GetTypeFromScope (Cppyy::GetNamed (name, parent));
597
+ }
598
+
599
+ if (!type) {
607
600
types.clear ();
608
601
return true ;
609
602
}
603
+
604
+ if (is_integral (i))
605
+ integral_value = strdup (i.c_str ());
606
+ types.emplace_back (type, integral_value);
610
607
}
611
608
return false ;
612
609
}
You can’t perform that action at this time.
0 commit comments