[fdo-users] ArcSDE: Another serious bug (general C++ trap)

Oyvind Idland oyvind.idland at gmail.com
Mon Feb 28 07:40:44 EST 2011


In the definition of ArcSDEFilterToSql  (in ArcSDEFilterToSQL.h), there are
two
constructors:

    ArcSDEFilterToSql() { ArcSDEFilterToSql(NULL, NULL); }  // 0-argument
constructor to please FdoPtr::operator->

    ArcSDEFilterToSql (ArcSDEConnection *conn, FdoClassDefinition*
definition);


The first one with no arguments will not work, in fact, it will just
allocate another instance of itself and return.

There is, as far as I know, no way to make a constructor call another
constructor in C++. Instead, an init() method
must be implemented.

I don't know if this constructor has ever been used, I just saw it while
refactoring code.. but I am a bit worried if
this has been done several places.


-- Oyvind
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-users/attachments/20110228/c66c6069/attachment.html


More information about the fdo-users mailing list