Fixed ToString formatting of enum
This commit is contained in:
parent
d8074fa5cb
commit
5dcf3b3d1a
@ -333,7 +333,7 @@ func (section *EnumSection) ToString (indent int) (output string) {
|
|||||||
section.what.ToString(), "\n")
|
section.what.ToString(), "\n")
|
||||||
|
|
||||||
for _, name := range sortMapKeysAlphabetically(section.members) {
|
for _, name := range sortMapKeysAlphabetically(section.members) {
|
||||||
output += doIndent(indent, name, " ")
|
output += doIndent(indent + 1, name)
|
||||||
|
|
||||||
defaultValue := section.members[name]
|
defaultValue := section.members[name]
|
||||||
|
|
||||||
@ -345,7 +345,7 @@ func (section *EnumSection) ToString (indent int) (output string) {
|
|||||||
output += "\n"
|
output += "\n"
|
||||||
} else if isComplexInitialization {
|
} else if isComplexInitialization {
|
||||||
output += "\n"
|
output += "\n"
|
||||||
output += defaultValue.ToString(indent + 1, true)
|
output += defaultValue.ToString(indent + 2, true)
|
||||||
} else {
|
} else {
|
||||||
output += " " + defaultValue.ToString(0, false)
|
output += " " + defaultValue.ToString(0, false)
|
||||||
output += "\n"
|
output += "\n"
|
||||||
|
Reference in New Issue
Block a user