Selaa lähdekoodia

More fixes for compilation warnings

Victor Luchits 12 vuotta sitten
vanhempi
sitoutus
4b4dd2886f
2 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 5 5
      Source/Core/Geometry.cpp
  2. 2 2
      Source/Debugger/Geometry.cpp

+ 5 - 5
Source/Core/Geometry.cpp

@@ -47,7 +47,7 @@ Geometry::Geometry(Element* _host_element)
 
 
 	fixed_texcoords = false;
 	fixed_texcoords = false;
 	compile_attempted = false;
 	compile_attempted = false;
-	compiled_geometry = NULL;
+	compiled_geometry = 0;
 }
 }
 
 
 Geometry::Geometry(Context* _host_context)
 Geometry::Geometry(Context* _host_context)
@@ -61,7 +61,7 @@ Geometry::Geometry(Context* _host_context)
 
 
 	fixed_texcoords = false;
 	fixed_texcoords = false;
 	compile_attempted = false;
 	compile_attempted = false;
-	compiled_geometry = NULL;
+	compiled_geometry = 0;
 }
 }
 
 
 Geometry::~Geometry()
 Geometry::~Geometry()
@@ -128,7 +128,7 @@ void Geometry::Render(const Vector2f& translation)
 			}
 			}
 
 
 			compile_attempted = true;
 			compile_attempted = true;
-			compiled_geometry = render_interface->CompileGeometry(&vertices[0], (int) vertices.size(), &indices[0], (int) indices.size(), texture != NULL ? texture->GetHandle(GetRenderInterface()) : NULL);
+			compiled_geometry = render_interface->CompileGeometry(&vertices[0], (int) vertices.size(), &indices[0], (int) indices.size(), texture != NULL ? texture->GetHandle(GetRenderInterface()) : 0);
 
 
 			// If we managed to compile the geometry, we can clear the local copy of vertices and indices and
 			// If we managed to compile the geometry, we can clear the local copy of vertices and indices and
 			// immediately render the compiled version.
 			// immediately render the compiled version.
@@ -141,7 +141,7 @@ void Geometry::Render(const Vector2f& translation)
 
 
 		// Either we've attempted to compile before (and failed), or the compile we just attempted failed; either way,
 		// Either we've attempted to compile before (and failed), or the compile we just attempted failed; either way,
 		// render the uncompiled version.
 		// render the uncompiled version.
-		render_interface->RenderGeometry(&vertices[0], (int) vertices.size(), &indices[0], (int) indices.size(), texture != NULL ? texture->GetHandle(GetRenderInterface()) : NULL, translation);
+		render_interface->RenderGeometry(&vertices[0], (int) vertices.size(), &indices[0], (int) indices.size(), texture != NULL ? texture->GetHandle(GetRenderInterface()) : 0, translation);
 	}
 	}
 }
 }
 
 
@@ -175,7 +175,7 @@ void Geometry::Release(bool clear_buffers)
 	if (compiled_geometry)
 	if (compiled_geometry)
 	{
 	{
 		GetRenderInterface()->ReleaseCompiledGeometry(compiled_geometry);
 		GetRenderInterface()->ReleaseCompiledGeometry(compiled_geometry);
-		compiled_geometry = NULL;
+		compiled_geometry = 0;
 	}
 	}
 
 
 	compile_attempted = false;
 	compile_attempted = false;

+ 2 - 2
Source/Debugger/Geometry.cpp

@@ -58,7 +58,7 @@ void Geometry::RenderOutline(const Core::Vector2f& origin, const Core::Vector2f&
 	Core::GeometryUtilities::GenerateQuad(vertices + 8, indices + 12, Core::Vector2f(0, 0), Core::Vector2f(width, dimensions.y), colour, 8);
 	Core::GeometryUtilities::GenerateQuad(vertices + 8, indices + 12, Core::Vector2f(0, 0), Core::Vector2f(width, dimensions.y), colour, 8);
 	Core::GeometryUtilities::GenerateQuad(vertices + 12, indices + 18, Core::Vector2f(dimensions.x - width, 0), Core::Vector2f(width, dimensions.y), colour, 12);
 	Core::GeometryUtilities::GenerateQuad(vertices + 12, indices + 18, Core::Vector2f(dimensions.x - width, 0), Core::Vector2f(width, dimensions.y), colour, 12);
 
 
-	render_interface->RenderGeometry(vertices, 4 * 4, indices, 6 * 4, NULL, origin);
+	render_interface->RenderGeometry(vertices, 4 * 4, indices, 6 * 4, 0, origin);
 }
 }
 
 
 // Renders a box.
 // Renders a box.
@@ -74,7 +74,7 @@ void Geometry::RenderBox(const Core::Vector2f& origin, const Core::Vector2f& dim
 
 
 	Core::GeometryUtilities::GenerateQuad(vertices, indices, Core::Vector2f(0, 0), Core::Vector2f(dimensions.x, dimensions.y), colour, 0);
 	Core::GeometryUtilities::GenerateQuad(vertices, indices, Core::Vector2f(0, 0), Core::Vector2f(dimensions.x, dimensions.y), colour, 0);
 
 
-	render_interface->RenderGeometry(vertices, 4, indices, 6, NULL, origin);
+	render_interface->RenderGeometry(vertices, 4, indices, 6, 0, origin);
 }
 }
 
 
 // Renders a box with a hole in the middle.
 // Renders a box with a hole in the middle.