I'll look into it when I'm done with the current patch (geometry issues + related cleanup)<br><br><br>-- Oyvind<br><br><div class="gmail_quote">On Mon, Feb 28, 2011 at 5:07 PM, Greg Boone <span dir="ltr"><<a href="mailto:greg.boone@autodesk.com">greg.boone@autodesk.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hi Oyvind,</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Please log a Trac ticket and attach a patch with your recommended changes.
</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Regards,</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Greg</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Traian Stanev<br>
<b>Sent:</b> Monday, February 28, 2011 10:59 AM<div><div></div><div class="h5"><br>
<b>To:</b> 'FDO Users Mail List'<br>
<b>Subject:</b> RE: [fdo-users] ArcSDE: Another serious bug (general C++ trap)</div></div></span></p>
</div>
</div><div><div></div><div class="h5">
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">In fact, in C++ it will not initialize the object, unlike e.g. Java.
</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">As the poster said, it will construct an ArcSDEFilterToSQL in the local scope and then return, with the object the caller wanted to initialize being left uninitialized.
It’s a serious bug if that constructor is ever used.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Traian</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Greg Boone<br>
<b>Sent:</b> Monday, February 28, 2011 10:27 AM<br>
<b>To:</b> FDO Users Mail List<br>
<b>Subject:</b> RE: [fdo-users] ArcSDE: Another serious bug (general C++ trap)</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">This looks like a good area for refactoring. I agree that having the default constructor call the non-default constructor is not the best approach.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Greg</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:fdo-users-bounces@lists.osgeo.org" target="_blank">fdo-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Oyvind Idland<br>
<b>Sent:</b> Monday, February 28, 2011 7:41 AM<br>
<b>To:</b> FDO Users Mail List<br>
<b>Subject:</b> [fdo-users] ArcSDE: Another serious bug (general C++ trap)</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-bottom: 12pt;">In the definition of ArcSDEFilterToSql (in ArcSDEFilterToSQL.h), there are two<br>
constructors:<br>
<br>
ArcSDEFilterToSql() { ArcSDEFilterToSql(NULL, NULL); } // 0-argument constructor to please FdoPtr::operator-><br>
<br>
ArcSDEFilterToSql (ArcSDEConnection *conn, FdoClassDefinition* definition);<br>
<br>
<br>
The first one with no arguments will not work, in fact, it will just allocate another instance of itself and return.<br>
<br>
There is, as far as I know, no way to make a constructor call another constructor in C++. Instead, an init() method<br>
must be implemented.<br>
<br>
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<br>
this has been done several places.<br>
<br>
<br>
-- Oyvind<br>
<br>
<br>
</p>
</div></div></div>
</div>
<br>_______________________________________________<br>
fdo-users mailing list<br>
<a href="mailto:fdo-users@lists.osgeo.org">fdo-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/fdo-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/fdo-users</a><br>
<br></blockquote></div><br>