diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-11-23 23:36:49 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-11-23 23:36:49 +0000 |
| commit | 0969085ddf607a7a98cf7fd6d9b10da5fbebe62d (patch) | |
| tree | 59b2bc9ed3412ab2de4c703ef30342dfe2401704 /src/object-hierarchy.cpp | |
| parent | refactor from lastApplied (diff) | |
| parent | Fixed a bug pointed by suv running from comand line, also removed another des... (diff) | |
| download | inkscape-0969085ddf607a7a98cf7fd6d9b10da5fbebe62d.tar.gz inkscape-0969085ddf607a7a98cf7fd6d9b10da5fbebe62d.zip | |
fixing to trunk
(bzr r12588.1.34)
Diffstat (limited to 'src/object-hierarchy.cpp')
| -rw-r--r-- | src/object-hierarchy.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/object-hierarchy.cpp b/src/object-hierarchy.cpp index f2bf177dc..f241da83d 100644 --- a/src/object-hierarchy.cpp +++ b/src/object-hierarchy.cpp @@ -9,6 +9,9 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include <cstdio> +#include <cassert> + #include "sp-object.h" #include "object-hierarchy.h" @@ -32,7 +35,7 @@ void ObjectHierarchy::clear() { } void ObjectHierarchy::setTop(SPObject *object) { - g_return_if_fail(object != NULL); + if (object == NULL) { printf("Assertion object != NULL failed\n"); return; } if ( top() == object ) { return; @@ -53,8 +56,8 @@ void ObjectHierarchy::setTop(SPObject *object) { } void ObjectHierarchy::_addTop(SPObject *senior, SPObject *junior) { - g_assert(junior != NULL); - g_assert(senior != NULL); + assert(junior != NULL); + assert(senior != NULL); SPObject *object = junior->parent; do { @@ -64,7 +67,7 @@ void ObjectHierarchy::_addTop(SPObject *senior, SPObject *junior) { } void ObjectHierarchy::_addTop(SPObject *object) { - g_assert(object != NULL); + assert(object != NULL); _hierarchy.push_back(_attach(object)); _added_signal.emit(object); } @@ -82,7 +85,7 @@ void ObjectHierarchy::_trimAbove(SPObject *limit) { } void ObjectHierarchy::setBottom(SPObject *object) { - g_return_if_fail(object != NULL); + if (object == NULL) { printf("assertion object != NULL failed\n"); return; } if ( bottom() == object ) { return; @@ -125,8 +128,8 @@ void ObjectHierarchy::_trimBelow(SPObject *limit) { } void ObjectHierarchy::_addBottom(SPObject *senior, SPObject *junior) { - g_assert(junior != NULL); - g_assert(senior != NULL); + assert(junior != NULL); + assert(senior != NULL); if ( junior != senior ) { _addBottom(senior, junior->parent); @@ -135,15 +138,15 @@ void ObjectHierarchy::_addBottom(SPObject *senior, SPObject *junior) { } void ObjectHierarchy::_addBottom(SPObject *object) { - g_assert(object != NULL); + assert(object != NULL); _hierarchy.push_front(_attach(object)); _added_signal.emit(object); } void ObjectHierarchy::_trim_for_release(SPObject *object) { this->_trimBelow(object); - g_assert(!this->_hierarchy.empty()); - g_assert(this->_hierarchy.front().object == object); + assert(!this->_hierarchy.empty()); + assert(this->_hierarchy.front().object == object); sp_object_ref(object, NULL); this->_detach(this->_hierarchy.front()); |
