Skip to content

Commit

Permalink
Fix C4296 in bindingccpp
Browse files Browse the repository at this point in the history
  • Loading branch information
martinweismann committed Sep 20, 2021
1 parent 97e2c4c commit 728cff8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/buildbindingccpp.go
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,11 @@ func buildCppHeader(component ComponentDefinition, w LanguageWriter, NameSpace s
w.Writeln(" {")
w.Writeln(" %s_uint32 nMajor, nMinor, nMicro;", NameSpace)
w.Writeln(" %s(nMajor, nMinor, nMicro);", global.VersionMethod)
w.Writeln(" if ( (nMajor != %s_VERSION_MAJOR) || (nMinor < %s_VERSION_MINOR) ) {", strings.ToUpper(NameSpace), strings.ToUpper(NameSpace))
if minorVersion(component.Version) > 0 {
w.Writeln(" if ( (nMajor != %s_VERSION_MAJOR) || (nMinor < %s_VERSION_MINOR) ) {", strings.ToUpper(NameSpace), strings.ToUpper(NameSpace))
} else {
w.Writeln(" if (nMajor != %s_VERSION_MAJOR) {", strings.ToUpper(NameSpace))
}
w.Writeln(" return %s_ERROR_INCOMPATIBLEBINARYVERSION;", strings.ToUpper(NameSpace))
w.Writeln(" }")
w.Writeln(" return %s_SUCCESS;", strings.ToUpper(NameSpace))
Expand Down

0 comments on commit 728cff8

Please sign in to comment.