zoomedit:

* Use 0 instead of NULL consistantly
This commit is contained in:
neoraider 2008-04-14 09:19:00 +00:00
parent 55af49b483
commit 9c24bd0bb2
5 changed files with 14 additions and 14 deletions

View file

@ -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) {

View file

@ -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;
}
}

View file

@ -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() {

View file

@ -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) {

View file

@ -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);
}