<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/118943/">https://git.reviewboard.kde.org/r/118943/</a>
     </td>
    </tr>
   </table>
   <br />











<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://git.reviewboard.kde.org/r/118943/diff/3/?file=284741#file284741line49" style="color: black; font-weight: bold; text-decoration: underline;">src/lib/marble/geodata/data/GeoDataUpdate.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 3)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">GeoDataUpdate &GeoDataUpdate::operator=( const GeoDataUpdate &other )</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">49</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span class="k">if</span><span class="p">(</span> <span class="p">(</span> <span class="o">!</span><span class="n">d</span><span class="o">-></span><span class="n">m_change</span> <span class="o">&&</span> <span class="n">other</span><span class="p">.</span><span class="n">d</span><span class="o">-></span><span class="n">m_change</span> <span class="p">)</span> <span class="o">||</span> <span class="p">(</span> <span class="n">d</span><span class="o">-></span><span class="n">m_change</span> <span class="o">&&</span> <span class="o">!</span><span class="n">other</span><span class="p">.</span><span class="n">d</span><span class="o">-></span><span class="n">m_change</span><span class="p">)</span> <span class="p">){</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Wouldn't they still be equal if one has a null pointer as change and the other an empty change? I'd do

bool const changeEmpty = !d->m_change || d->m_change->size() == 0;
bool const otherChangeEmpty = !other.d->m_change || other.d->m_change->size() == 0;

if( ( changeEmpty != otherChangeEmpty ) {
  return false;
} else if( d->m_change && other.d->m_change && *d->m_change != *other.d->m_change ) {
  return false;
}

return d->m_targetHref == other.d->m_targetHref;
</pre>
</div>
<br />



<p>- Dennis Nienhüser</p>


<br />
<p>On June 26th, 2014, 8:45 a.m. UTC, Sanjiban Bairagya wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Marble, Dennis Nienhüser and Torsten Rahn.</div>
<div>By Sanjiban Bairagya.</div>


<p style="color: grey;"><i>Updated June 26, 2014, 8:45 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
marble
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This patch allows to accept Placemarks as children of GeoDataChange</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Tested and passed with tests/Tour.kml</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/lib/marble/geodata/CMakeLists.txt <span style="color: grey">(bac40ac)</span></li>

 <li>src/lib/marble/geodata/data/GeoDataAnimatedUpdate.h <span style="color: grey">(5794656)</span></li>

 <li>src/lib/marble/geodata/data/GeoDataAnimatedUpdate.cpp <span style="color: grey">(511073c)</span></li>

 <li>src/lib/marble/geodata/data/GeoDataChange.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/marble/geodata/data/GeoDataChange.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/marble/geodata/data/GeoDataUpdate.h <span style="color: grey">(ddadee2)</span></li>

 <li>src/lib/marble/geodata/data/GeoDataUpdate.cpp <span style="color: grey">(ce42922)</span></li>

 <li>src/lib/marble/geodata/handlers/kml/KmlAltitudeModeTagHandler.cpp <span style="color: grey">(9827969)</span></li>

 <li>src/lib/marble/geodata/handlers/kml/KmlChangeTagHandler.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/marble/geodata/handlers/kml/KmlChangeTagHandler.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/marble/geodata/handlers/kml/KmlGxAltitudeModeTagHandler.cpp <span style="color: grey">(3a6bf5a)</span></li>

 <li>src/lib/marble/geodata/handlers/kml/KmlModelTagHandler.cpp <span style="color: grey">(fe2f126)</span></li>

 <li>src/lib/marble/geodata/handlers/kml/KmlPlacemarkTagHandler.cpp <span style="color: grey">(110bc40)</span></li>

 <li>src/lib/marble/geodata/handlers/kml/KmlUpdateTagHandler.cpp <span style="color: grey">(534749c)</span></li>

 <li>src/lib/marble/geodata/parser/GeoDataTypes.h <span style="color: grey">(dafcea3)</span></li>

 <li>src/lib/marble/geodata/parser/GeoDataTypes.cpp <span style="color: grey">(e87b876)</span></li>

 <li>src/lib/marble/geodata/writers/kml/KmlAnimatedUpdateTagWriter.h <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/marble/geodata/writers/kml/KmlAnimatedUpdateTagWriter.cpp <span style="color: grey">(PRE-CREATION)</span></li>

 <li>src/lib/marble/geodata/writers/kml/KmlLookAtTagWriter.cpp <span style="color: grey">(4e45daa)</span></li>

 <li>src/lib/marble/geodata/writers/kml/KmlPlaylistTagWriter.cpp <span style="color: grey">(86511bb)</span></li>

 <li>src/lib/marble/geodata/writers/kml/KmlPointTagWriter.cpp <span style="color: grey">(70eadbc)</span></li>

 <li>src/lib/marble/geodata/writers/kml/KmlUpdateTagWriter.cpp <span style="color: grey">(fc1ddf6)</span></li>

 <li>tests/TestTour.cpp <span style="color: grey">(db2d9c9)</span></li>

 <li>tests/data/Tour.kml <span style="color: grey">(d9fc9ed)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/118943/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>