<div dir="ltr">Aashish,<div><br></div><div>Go find the discussion David and I had about why overloads are not good :-) Having many different overloads puts a lot of burden on the subclass that may want to overwrite only one of the signatures.</div><div><br></div><div>Best,</div><div>-berk</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 2, 2016 at 3:39 PM, Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Berk,<br>
<br>
+100 for the new API. Why not pass time as part of the update? So<br>
instead of this<br>
<span class=""><br>
Update(int piece, int numPieces, int ghostLevel);<br>
Update(int piece, int numPieces, int ghostLevel, int* updateExtent);<br>
UpdateTimeStep(double time);<br>
UpdateTimeStep(double time, int piece, int numPieces, int ghostLevel);<br>
UpdateTimeStep(double time, int piece, int numPieces, int ghostLevel,<br>
int* updateExtent);<br>
<br>
</span>You will have:<br>
<span class="">Update(int piece, int numPieces, int ghostLevel);<br>
</span>Update(int piece, int numPieces, double time, int ghostLevel);<br>
<span class="">Update(int piece, int numPieces, int ghostLevel, int* updateExtent);<br>
</span>Update(int piece, int numPieces, double time, int ghostLevel, int*<br>
updateExtent);<br>
<br>
since for most part their argument is almost identical.<br>
<br>
- aashish<br>
<div><div class="h5"><br>
On Wed, Mar 2, 2016 at 3:32 PM, Sean McBride <<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>> wrote:<br>
> I guess that obsoletes this:<br>
> <<a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/1292" rel="noreferrer" target="_blank">https://gitlab.kitware.com/vtk/vtk/merge_requests/1292</a>><br>
><br>
> Maybe you could fix that up at the same time David?<br>
><br>
> Sean<br>
><br>
><br>
> On Wed, 2 Mar 2016 13:12:44 -0700, David Gobbi said:<br>
><br>
>>Will do.<br>
>><br>
>>On Wed, Mar 2, 2016 at 1:08 PM, Berk Geveci <<a href="mailto:berk.geveci@kitware.com">berk.geveci@kitware.com</a>> wrote:<br>
>><br>
>>> Ugh. That's a typo (probably copy & paste error). If you look at the<br>
>>> implementation, it actually doesn't check for NULL pointer. I am swamped<br>
>>> now. Do you have a few cycles to push a fix?<br>
>>><br>
>>> On Wed, Mar 2, 2016 at 2:12 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>>><br>
>>>> Hi Berk,<br>
>>>><br>
>>>> One of the things that I'm not quite sure about is, why is it permitted<br>
>>>> to call algorithm->UpdateExtent() with no arguments?<br>
>>>><br>
>>>>   int UpdateExtent(const int extents[6]=0)<br>
>>>><br>
>>>> If I understand the code, UpdateExtent() with no args is the same as<br>
>>>> Update().  It seems dangerous to allow this, because a programmer could<br>
>>>> easily type UpdateExtent() by accident instead of UpdateWholeExtent(),<br>
>>>> especially if they have autocompletion turned on in their code editor (and<br>
>>>> especially because Update() and UpdateWholeExtent() give the same result<br>
>>>> most of the time).<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
| Aashish Chaudhary<br>
| Technical Leader<br>
| Kitware Inc.<br>
| <a href="http://www.kitware.com/company/team/chaudhary.html" rel="noreferrer" target="_blank">http://www.kitware.com/company/team/chaudhary.html</a><br>
</font></span></blockquote></div><br></div>