Dirk Reiners wrote:

Why do you need the extra pass over the list for clearing the masks? If
an FC is changed within changed again I'd rather have it use the new
mask for the next round of changed()s, something like:

endEdit()
{
   for(i = chList.begin() ; i != cI.end() ; i++)
   {
       mask = i->mask;
       i->mask = 0;
       i->fc->changed(mask);
   }
   chLIst.clear();
}

Or did I miss something here?

Note that this will break when using vectors for the CL, as adding to
the list will invalidate the iterators.

        Dirk

Gerrit mentioned the problem of changes in the changed functions and as a result of this a recoursive call of changed functions. If the mask is cleared after all changed calls, no recoursion could happen. But I'm not sure if this is realy a problem. I would prefere your solution. But I would use stl:lists instead of vectors. As we don't need random access, lists have the advantage that we dont't have large unused and not freed memory blocks after loading a file. But this is only a minor implementation detail.

Marcus










-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to