> On March 1, 2011, 7:04 p.m., Merov Linden wrote: > > I've nothing against lazy evaluation (I actually like that) but I don't > > like "static bool" showing up in the middle of the code to execute a piece > > of initialization once. Is that really something that should be done *once* > > per instance of the application or *once* per instantiation of the object? > > I'd prefer to have that synchronization done in the constructor or in an > > init method or at least have the bool a class or object member (as > > adequate) that's set to true on instantiation.
The code with "static bool" is not new, I've just moved it to sync the calling card with friends list on viewer start up. LLInventoryFriendCardObserver::changed() is used to make sure the inventory became usable since the viewer had started, so this is not a part of LLInventoryFriendCardObserver initialization but rather an action that should be taken once per viewer session. When working on the patch I didn't replace this static with a member because it was not meant to be used elsewhere. - Seth ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://codereview.secondlife.com/r/159/#review401 ----------------------------------------------------------- On March 2, 2011, 8:47 a.m., Seth ProductEngine wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://codereview.secondlife.com/r/159/ > ----------------------------------------------------------- > > (Updated March 2, 2011, 8:47 a.m.) > > > Review request for Viewer. > > > Summary > ------- > > - Added creating own calling card for the user to be able to share it with > other residents. > - Moved calling cards synchronization with friends list to the viewer start > up. Previously synchronized upon opening the Friends tab in People side panel. > - Calling cards for non-friends are not removed upon calling cards > synchronization with friends list. > - Enabled "Share" menu item for calling cards in inventory. > > > This addresses bug STORM-28. > http://jira.secondlife.com/browse/STORM-28 > > > Diffs > ----- > > indra/newview/llfriendcard.h 767feb16f05f > indra/newview/llfriendcard.cpp 767feb16f05f > indra/newview/llinventoryfunctions.cpp 767feb16f05f > indra/newview/llpanelpeople.cpp 767feb16f05f > > Diff: http://codereview.secondlife.com/r/159/diff > > > Testing > ------- > > > Thanks, > > Seth > >
_______________________________________________ Policies and (un)subscribe information available here: http://wiki.secondlife.com/wiki/OpenSource-Dev Please read the policies before posting to keep unmoderated posting privileges