File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
languages/cpp/templates/codeblocks Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
${if .modules } ${info.Title }::I${info.Title }& ${info.Title }Interface() const override
2
2
{
3
3
auto module = _moduleMap.find (" ${info.Title}" );
4
- ${info.Title }::I ${info.Title }* ${info.title .lowercase } = nullptr ;
4
+ ${info.Title }::${info.Title }Impl * ${info.title .lowercase } = nullptr ;
5
5
6
6
if (module != _moduleMap.end ()) {
7
- ${info.title .lowercase } = reinterpret_cast <${info.Title }::I ${info.Title }*>(module ->second );
7
+ ${info.title .lowercase } = dynamic_cast <${info.Title }::${info.Title }Impl *>(module ->second );
8
8
} else {
9
- ${info.title .lowercase } = reinterpret_cast <${info. Title }::I${info. Title }*>( new ${info.Title }::${info.Title }Impl () );
10
- _moduleMap.emplace (" ${info.Title}" , reinterpret_cast <IModule*>( ${info.title .lowercase }) );
9
+ ${info.title .lowercase } = new ${info.Title }::${info.Title }Impl ();
10
+ _moduleMap.emplace (" ${info.Title}" , ${info.title .lowercase });
11
11
}
12
12
return *${info.title .lowercase };
13
13
}
You can’t perform that action at this time.
0 commit comments