Skip to content

Commit

Permalink
Fix string cache comp. error (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinweismann committed Oct 7, 2021
1 parent 728cff8 commit 8cdae44
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Source/buildimplementationcpp.go
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ func buildCPPInterfaceWrapper(component ComponentDefinition, w LanguageWriter, N
}


func buildOutCacheTemplateParameters (method ComponentDefinitionMethod, NameSpace string) (string, error) {
func buildOutCacheTemplateParameters (method ComponentDefinitionMethod, NameSpace string, BaseClassName string, ClassIdentifier string) (string, error) {
result := "";

for i := 0; i < len (method.Params); i++ {
Expand All @@ -886,6 +886,9 @@ func buildOutCacheTemplateParameters (method ComponentDefinitionMethod, NameSpac
}

cppParamType := getCppParamType(param, NameSpace, true);
if param.ParamType == "class" || param.ParamType == "optionalclass" {
cppParamType = fmt.Sprintf("I%s%s*", ClassIdentifier, BaseClassName)
}
result += cppParamType;
}

Expand Down Expand Up @@ -975,7 +978,7 @@ func writeCImplementationMethod(component ComponentDefinition, method ComponentD
return errors.New ("String out parameter without being the string out base class.");
}

templateParameters, err := buildOutCacheTemplateParameters (method, NameSpace);
templateParameters, err := buildOutCacheTemplateParameters (method, NameSpace, BaseClassName, ClassIdentifier);
if err != nil {
return err
}
Expand Down

0 comments on commit 8cdae44

Please sign in to comment.