mirror of
https://github.com/mappu/miqt.git
synced 2025-01-21 22:20:38 +00:00
genbindings: better names for push_back(), fix_neg_rect()
This commit is contained in:
parent
d8145be2da
commit
28b6684004
@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@ -116,7 +117,12 @@ func (nm CppMethod) SafeMethodName() string {
|
||||
tmp := replacer.Replace(nm.MethodName)
|
||||
|
||||
// Also make the first letter uppercase so it becomes public in Go
|
||||
return titleCase(tmp)
|
||||
tmp = titleCase(tmp)
|
||||
|
||||
// Also replace any underscore_case with CamelCase
|
||||
tmp = regexp.MustCompile(`_([a-z])`).ReplaceAllStringFunc(tmp, func(match string) string { return strings.ToUpper(match[1:]) })
|
||||
|
||||
return tmp
|
||||
}
|
||||
|
||||
type CppClass struct {
|
||||
|
Loading…
x
Reference in New Issue
Block a user