mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
genbindings/fmt: replace trivial sprintf with strconv
This commit is contained in:
parent
f6acae63bb
commit
2d665dd840
@ -604,7 +604,7 @@ nextEnumEntry:
|
||||
if !foundValidInner {
|
||||
// Enum case without definition e.g. QCalendar::Gregorian
|
||||
// This means one more than the last value
|
||||
cee.EntryValue = fmt.Sprintf("%d", lastImplicitValue+1)
|
||||
cee.EntryValue = strconv.FormatInt(lastImplicitValue+1, 10)
|
||||
}
|
||||
|
||||
afterParse:
|
||||
|
@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
// astTransformOptional expands all methods with optional parameters into
|
||||
@ -33,7 +33,7 @@ func astTransformOptional(parsed *CppParsedHeader) {
|
||||
// Add method copies
|
||||
for x := optionalStart; x < len(m.Parameters); x++ {
|
||||
dupMethod := m // shallow copy
|
||||
dupMethod.Rename(m.MethodName + fmt.Sprintf("%d", x+1))
|
||||
dupMethod.Rename(m.MethodName + strconv.Itoa(x+1))
|
||||
dupMethod.Parameters = m.Parameters[0 : x+1]
|
||||
dupMethod.HiddenParams = m.Parameters[x+1:]
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"log"
|
||||
"strings"
|
||||
)
|
||||
@ -12,7 +12,7 @@ func maybeSuffix(counter int) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%d", counter+1)
|
||||
return strconv.Itoa(counter+1)
|
||||
}
|
||||
|
||||
func titleCase(s string) string {
|
||||
|
Loading…
Reference in New Issue
Block a user