Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#6902 closed defect (fixed)

GDALCreateApproxTransformer2 needs cleanup

Reported by: Kurt Schwehr Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

Based on review comments from pklier:

  • It should not return a void *. That casting should be happening as a cast in GDALCreateApproxTransformer
  • Why forward declare GDALCreateApproxTransformer2? Just reorder so that it only needs the static function

Should this comment say "*destination*?

/* Handle optional source approximation transformer.                    */
/* -------------------------------------------------------------------- */
    if( psInfo->pDstTransformer

Change History (2)

comment:1 Changed 2 years ago by Even Rouault

Resolution: fixed
Status: newclosed

In 38786:

Fix comment (fixes #6902)

comment:2 Changed 2 years ago by Even Rouault

I tried to move GDALCreateApproxTransformer2 upper, but it depends on other static methods that are defined lower, so this would imply moving too many things. Not really worth it IMHO

Regarding the return type, as all Create...Transformer() function return opaque pointers, this is consistant to do so.

Note: See TracTickets for help on using tickets.