Commits

Anonymous committed b9f55f6

gofmt

  • Participants
  • Parent commits c5844f5

Comments (0)

Files changed (3)

File pkg/cxxtypes/gccxml/xmlstructs.go

 	// dtors
 	for _, v := range x.Destructors {
 		if len(v.name()) > 1 && string(v.name()[0]) != "~" {
-			v.set_name("~"+v.name())
+			v.set_name("~" + v.name())
 		}
 		if len(v.name()) >= 3 && string(v.name()[0:3]) != "_ZT" {
 			v.set_name(addTemplateToName(v.name(), v.demangled()))

File pkg/cxxtypes/types.go

 	if err != nil {
 		return err
 	}
-	for i,_ := range t.Members {
+	for i, _ := range t.Members {
 		mbr := &t.Members[i]
 		if mbr.IsDataMember() {
 			add_id(mbr)
 	set_scope(t.Members, t, parent_scope)
 
 	// add enum-members to the identifier-registry
-	for i,_ := range t.Members {
+	for i, _ := range t.Members {
 		add_id(&t.Members[i])
 	}
 
 	if err != nil {
 		return err
 	}
-	for i,_ := range t.Members {
+	for i, _ := range t.Members {
 		mbr := &t.Members[i]
 		if mbr.IsDataMember() {
 			add_id(mbr)
 
 func (m *Member) IsFunctionMember() bool {
 	return (m.Kind == TK_FunctionProto) ||
-	 	(m.Kind == TK_FunctionNoProto)
+		(m.Kind == TK_FunctionNoProto)
 }
 
 func id_kind_from_tk(tk TypeKind) IdKind {

File pkg/wrapper/plugins/cxxgo/cxxgo.go

 			nremoved = 0
 			//fmt.Printf("---\n")
 			sel_ids := make([]string, 0, len(p.ids))
-			for _,n := range p.ids {
+			for _, n := range p.ids {
 				id := cxxtypes.IdByName(n)
-				if mbr,ok := id.(*cxxtypes.Member); ok {
+				if mbr, ok := id.(*cxxtypes.Member); ok {
 					pid := cxxtypes.IdByName(mbr.Scope)
-					if pid != nil && 
+					if pid != nil &&
 						str_is_in_slice(pid.IdScopedName(), p.ids) {
 						// parent is already selected... discard member
 						nremoved += 1
 
 	// corresponding implementation...
 	fmter(bufs["go_impl"],
-	`
+		`
 func (p %s) Get%s() %s {
  var dummy %s
  return dummy
 	)
 
 	fmter(bufs["go_impl"],
-	`
+		`
 func (p %s) Set%s(arg %s) {
 }
 `,
 	ovfct := cxxtypes.IdByName(id.Name).(*cxxtypes.OverloadFunctionSet)
 	ndargs := 0
 	dbg := false
-	if id.IdScopedName() == "Foo::setFoo" { dbg = true }
-	for i,_ := range ovfct.Fcts {
+	if id.IdScopedName() == "Foo::setFoo" {
+		dbg = true
+	}
+	for i, _ := range ovfct.Fcts {
 		if ovfct.Function(i).NumDefaultParam() > 0 {
 			ndargs += 1
 		}
 		if dbg {
 			fmt.Printf("== ovfct[%d]...\n", i)
-			for ii,pp := range ovfct.Fcts[i].Params {
+			for ii, pp := range ovfct.Fcts[i].Params {
 				fmt.Printf("arg[%d]{%s, %s %v}\n", ii, pp.Name, pp.Type, pp.DefVal)
 			}
 		}
 	return strings.TrimSpace(strings.Join(s, ""))
 }
 
-
 // globals ----------------------
 
 var g_strtrans *strings.Replacer = strings.NewReplacer(