diff options
author | neoraider <devnull@localhost> | 2008-04-14 11:19:00 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2008-04-14 11:19:00 +0200 |
commit | 9c24bd0bb259124e36367c9c8a62af7b19ba8e67 (patch) | |
tree | fe3274185ef36bfd64e0c73ec364602109ba3a98 | |
parent | 55af49b48328d4828fe8520d7d7aa0bc776afeb0 (diff) | |
download | zoomedit-9c24bd0bb259124e36367c9c8a62af7b19ba8e67.tar zoomedit-9c24bd0bb259124e36367c9c8a62af7b19ba8e67.zip |
zoomedit:
* Use 0 instead of NULL consistantly
-rw-r--r-- | src/Data/Level.cpp | 6 | ||||
-rw-r--r-- | src/Data/Triangle.cpp | 4 | ||||
-rw-r--r-- | src/Gui/RenderArea.cpp | 4 | ||||
-rw-r--r-- | src/Instance.cpp | 6 | ||||
-rw-r--r-- | src/Util/Xml.cpp | 8 |
5 files changed, 14 insertions, 14 deletions
diff --git a/src/Data/Level.cpp b/src/Data/Level.cpp index 283bf66..7193f37 100644 --- a/src/Data/Level.cpp +++ b/src/Data/Level.cpp @@ -69,7 +69,7 @@ Room* Level::getRoom(const Glib::ustring &id) const { return *room; } - return NULL; + return 0; } Room* Level::addRoom(const Glib::ustring &id) { @@ -95,7 +95,7 @@ Gate* Level::getGate(const Glib::ustring &id) const { return *gate; } - return NULL; + return 0; } Gate* Level::addGate(const Glib::ustring &id) { @@ -123,7 +123,7 @@ Texture* Level::getTexture(const Glib::ustring &id) const { return *tex; } - return NULL; + return 0; } Texture* Level::addTexture(const Glib::ustring &id) { diff --git a/src/Data/Triangle.cpp b/src/Data/Triangle.cpp index a85d8ad..096081b 100644 --- a/src/Data/Triangle.cpp +++ b/src/Data/Triangle.cpp @@ -101,8 +101,8 @@ Triangle::Triangle(xmlpp::Element *node) : triangleNode(node) { vertexNodes[++i] = e; vertices[i] = loadVertex(e); - normalNodes[i] = NULL; - texCoordsNodes[i] = NULL; + normalNodes[i] = 0; + texCoordsNodes[i] = 0; } } diff --git a/src/Gui/RenderArea.cpp b/src/Gui/RenderArea.cpp index 576b1f7..39e1e45 100644 --- a/src/Gui/RenderArea.cpp +++ b/src/Gui/RenderArea.cpp @@ -28,7 +28,7 @@ namespace ZoomEdit { namespace Gui { -GdkGLConfig *RenderArea::glconfig = NULL; +GdkGLConfig *RenderArea::glconfig = 0; RenderArea::RenderArea(BaseObjectType *cobject, const Glib::RefPtr<Gnome::Glade::Xml> &xml) : Gtk::DrawingArea(cobject), xCenter(0), yCenter(0), zoomLevel(0), scale(100) { @@ -63,7 +63,7 @@ RenderArea::RenderArea(BaseObjectType *cobject, const Glib::RefPtr<Gnome::Glade: if(vScrollbar) vScrollbar->signal_value_changed().connect(sigc::mem_fun(this, &RenderArea::updateScrolling)); - gtk_widget_set_gl_capability(GTK_WIDGET(cobject), glconfig, NULL, TRUE, GDK_GL_RGBA_TYPE); + gtk_widget_set_gl_capability(GTK_WIDGET(cobject), glconfig, 0, TRUE, GDK_GL_RGBA_TYPE); } void RenderArea::onRealize() { diff --git a/src/Instance.cpp b/src/Instance.cpp index f602bbf..6d01d99 100644 --- a/src/Instance.cpp +++ b/src/Instance.cpp @@ -28,7 +28,7 @@ namespace ZoomEdit { guint Instance::instances = 0; -Instance::Instance(const Glib::ustring &file) : window(NULL), levelXml(NULL), level(NULL) { +Instance::Instance(const Glib::ustring &file) : window(0), levelXml(0), level(0) { instances++; #ifdef GLIBMM_EXCEPTIONS_ENABLED @@ -114,7 +114,7 @@ void Instance::createLevel() { bool Instance::loadLevel(const Glib::ustring &file) { if(level) { delete level; - level = NULL; + level = 0; } if(levelXml) @@ -131,7 +131,7 @@ bool Instance::loadLevel(const Glib::ustring &file) { level = new Data::Level(doc->get_root_node()); - return (level != NULL); + return (level != 0); } bool Instance::saveLevel(const Glib::ustring &file) { diff --git a/src/Util/Xml.cpp b/src/Util/Xml.cpp index 5dac26a..0339b45 100644 --- a/src/Util/Xml.cpp +++ b/src/Util/Xml.cpp @@ -25,15 +25,15 @@ namespace Util { xmlpp::Element* Xml::addSibling(xmlpp::Node *previous, const Glib::ustring &name) { if(!previous) - return NULL; + return 0; - xmlNodePtr child = xmlNewNode(NULL, (const xmlChar*)name.c_str()); + xmlNodePtr child = xmlNewNode(0, (const xmlChar*)name.c_str()); if(!child) - return NULL; + return 0; xmlNodePtr node = xmlAddNextSibling(previous->cobj(), child); if(!node) - return NULL; + return 0; return static_cast<xmlpp::Element*>(node->_private); } |