Skip to content

Commit

Permalink
minor fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
tbonfort committed Apr 23, 2024
1 parent d17f65c commit dad761a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions godal.go
Original file line number Diff line number Diff line change
Expand Up @@ -3517,11 +3517,7 @@ func (g *Geometry) GML(opts ...GMLExportOption) (string, error) {
for _, o := range opts {
o.setGMLExportOpt(gmlo)
}
switches := make([]string, len(gmlo.creation))
for i, copt := range gmlo.creation {
switches[i] = copt
}
cswitches := sliceToCStringArray(switches)
cswitches := sliceToCStringArray(gmlo.creation)
defer cswitches.free()
cgc := createCGOContext(nil, gmlo.errorHandler)
cgml := C.godalExportGeometryGML(cgc.cPointer(), g.handle, cswitches.cPointer())
Expand Down Expand Up @@ -3974,8 +3970,8 @@ func (ds *Dataset) Nearblack(dstDS string, switches []string, opts ...NearblackO

cgc := createCGOContext(nil, nearBlackOpts.errorHandler)

ret, err := C.godalNearblack(cgc.cPointer(), (*C.char)(dest), nil, ds.handle(), cswitches.cPointer())
if err = cgc.close(); err != nil {
ret := C.godalNearblack(cgc.cPointer(), (*C.char)(dest), nil, ds.handle(), cswitches.cPointer())
if err := cgc.close(); err != nil {
return nil, err
}

Expand Down

0 comments on commit dad761a

Please sign in to comment.