On 07/20/2013 01:04 PM, Tom Breton (Tehom) wrote:
> I check it with an assert,

   ISTM that rosegarden avoids assertions as much as possible, and 
instead avoids situations that might cause them.  I assume this is 
related to not wanting to lose the users data if they haven't saved 
recently.  E.g.

     if (p)
         p->foo();

...instead of

     assert(p);
     p->foo();

   If you search the code for assert you will find assertions are very 
rarely used.  Also, note where they are used the most.

   If you must assert, I think it would be best to use Q_ASSERT_X() 
which provides additional information to help with tracking down the 
cause of an assertion.

   If anyone can elaborate on what the rosegarden philosophy has been 
WRT assertions, that would be helpful.  Adding it to the standards on 
the wiki would be great too.

Ted.

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to