[CELayoutEditor Update] Lint, asserts and bug fixes

Use this forum for:
- Discussion regarding unofficial CEGUI related tools, scripts and utilities.
- User to user help for the obsoleted CELayoutEditor and CEImagesetEditor tools.

Moderators: CEGUI MVP, CEGUI Team

User avatar
fjeronimo
CEGUI Tools Developer (Retired)
Posts: 59
Joined: Tue Sep 11, 2007 16:57
Location: Lisbon, Portugal
Contact:

[CELayoutEditor Update] Lint, asserts and bug fixes

Postby fjeronimo » Thu Nov 22, 2007 16:32

Hello guys,

It's time for a new SVN update.

The update includes important bug fixes and internal changes that increase performance and code quality. PC-Lint (http://www.gimpel.com/) was also used to solve several issues.

Here's the detailed contents:

---------------//-----------------

Update features:

- New: _CPPUNWIND - Added explicit _CPPUNWIND to force CPP exception handling in Visual Studio 2005 & 2003 because in some cases the /EHsc compiler options gets ignored.

- New: Asserts - Added many assert verifications to the solution.

- New: PC-Lint configuration files - Added PC-Lint configuration files to CELayoutEditor at Docs\Lint. See PC-Lint entry below for more details.

- New: Log macros - Added LOG_EXCEPTION_SAFE macro, useful for catching exceptions inside a destructor (which should never throw exceptions).


- Change: PC-Lint - Run PC-Lint (8.00w) on the project. Many style changes including (but not limited to):
    * Removed unused variables.
    * Removed unused includes.
    * Prevented exceptions in destructors.
    * Nomenclature fixes (still a long way to go).
    * Initialized variables (notably during construction).
    * Added code validations (e.g. null pointer checks).
    * Renamed local variables that were hiding other global (or possibly even local) elements of lower scope.
    * Explicitly marked unused function return value as (void)func().
    * Added C++ casts where needed (static and const casts).
    * Removed unreachable code warnings.
    * Added missing destructors.
    * Avoided, whenever possible, calling virtual members during construction and destruction (since the base versions of these functions and never the derived would be called).
    * Used scoping operator to access static class members whenever possible (instead of using the instances directly).
    * Prevented unqualified virtual function calls.
    * Preferred constructor initialization list instead of assignment inside constructor for variable setup.
    * Reduced prototype coercion.
- Change: Const use - Improved const use throughout the code (including const member functions, const parameters and const ref parameters).

- Change: Replaced static_cast by wx_static_cast, which is safer and reverts back to C-style casting if static_cast is not supported.


- Bugfix: Memory leaks - Cleaned a couple of memory leaks by freeing allocated custodial pointers.

- Bugfix: Empty view check - Fixed a situation in EditorCanvas::OnKeyDown() that would cause a fatal error when trying to perform operations on an empty view.

- BugFix: Text colour crash - Fixed a crash in EditorDocument::HandleColoursUpdate when the user tried to modify the text color (via shift drag) of a window that didn't support the TextColours property.

- Bugfix: Default color - Fixed a bug in EditorDocument::HandleColoursUpdate() where the default color was always being chosen as the upper left corner of the rectangle (i.e. missing break statements in the switch/case).

- Bugfix: Mouse movement modification - Fixed a bug in EditorDocument::HandleMouseMoved where the function was always flagging a modification even when one wasn't being performed.


---------------//-----------------

Have fun.
Frederico Jerónimo
Ignite Games - http://www.ignite-games.com
Ignite Games Institutional Site - http://we.ignite-games.com

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Thu Nov 22, 2007 20:39

Wow :)
Check out my released snake game using Cegui!

User avatar
fjeronimo
CEGUI Tools Developer (Retired)
Posts: 59
Joined: Tue Sep 11, 2007 16:57
Location: Lisbon, Portugal
Contact:

Postby fjeronimo » Fri Nov 23, 2007 09:42

Thanks :)
Frederico Jerónimo

Ignite Games - http://www.ignite-games.com

Ignite Games Institutional Site - http://we.ignite-games.com

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Sat Nov 24, 2007 17:39

yeah you do a really good job i can only encourage you to continue :P

User avatar
fjeronimo
CEGUI Tools Developer (Retired)
Posts: 59
Joined: Tue Sep 11, 2007 16:57
Location: Lisbon, Portugal
Contact:

Postby fjeronimo » Sun Nov 25, 2007 22:11

Thanks pompei2. We plan to keep on making many more changes... :)
Frederico Jerónimo

Ignite Games - http://www.ignite-games.com

Ignite Games Institutional Site - http://we.ignite-games.com


Return to “Unofficial CEGUI-Related Tools”

Who is online

Users browsing this forum: No registered users and 11 guests