Skip to content

Commit 37b67b8

Browse files
committed
[core] Fix normalization issue on linux when resolving typedefs
1 parent f4e0d07 commit 37b67b8

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

core/foundation/src/TClassEdit.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,13 +454,13 @@ void TClassEdit::TSplitType::ShortType(std::string &answ, int mode)
454454
// do the same for all inside
455455
for (int i=1;i<narg; i++) {
456456
if (!strchr(fElements[i].c_str(),'<')) {
457+
if (mode&kResolveTypedef) {
458+
fElements[i] = ResolveTypedef(fElements[i].c_str(),true);
459+
}
457460
if (mode&kDropStd) {
458461
unsigned int offset = (0==strncmp("const ",fElements[i].c_str(),6)) ? 6 : 0;
459462
RemoveStd( fElements[i], offset );
460463
}
461-
if (mode&kResolveTypedef) {
462-
fElements[i] = ResolveTypedef(fElements[i].c_str(),true);
463-
}
464464
continue;
465465
}
466466
fElements[i] = TClassEdit::ShortType(fElements[i].c_str(),mode | TClassEdit::kKeepOuterConst);

core/foundation/test/testClassEdit.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ TEST(TClassEdit, GetNormalizedNameTypedef)
329329
)");
330330

331331
TClassEdit::GetNormalizedName(n, "MyMapDefault");
332-
EXPECT_STREQ("std::map<int,int>", n.c_str());
332+
EXPECT_STREQ("map<int,int>", n.c_str());
333333
}
334334

335335
// https://github.com/root-project/root/issues/18654

0 commit comments

Comments
 (0)