Browse Source

Fix gcc compilation warnings

Mostly 'converting to non-pointer type int from NULL' and vice versa
Victor Luchits 12 years ago
parent
commit
69feff3713

+ 1 - 1
Source/Core/DecoratorNone.cpp

@@ -38,7 +38,7 @@ DecoratorNone::~DecoratorNone()
 // Called on a decorator to generate any required per-element data for a newly decorated element.
 DecoratorDataHandle DecoratorNone::GenerateElementData(Element* ROCKET_UNUSED(element))
 {
-	return NULL;
+	return 0;
 }
 
 // Called to release element data generated by this decorator.

+ 1 - 1
Source/Core/ElementStyleCache.cpp

@@ -38,7 +38,7 @@ ElementStyleCache::ElementStyleCache(ElementStyle *style) : style(style),
 	padding_top(NULL), padding_bottom(NULL), padding_left(NULL), padding_right(NULL),
 	width(NULL), height(NULL),
 	local_width(NULL), local_height(NULL), have_local_width(false), have_local_height(false),
-	overflow_x(NULL), overflow_y(NULL),
+	overflow_x(-1), overflow_y(-1),
 	position(-1), float_(-1), display(-1), whitespace(-1),
 	line_height(NULL), text_align(-1), text_transform(-1), vertical_align(NULL)
 {

+ 1 - 1
Source/Core/RenderInterface.cpp

@@ -44,7 +44,7 @@ RenderInterface::~RenderInterface()
 // Called by Rocket when it wants to compile geometry it believes will be static for the forseeable future.
 CompiledGeometryHandle RenderInterface::CompileGeometry(Vertex* ROCKET_UNUSED(vertices), int ROCKET_UNUSED(num_vertices), int* ROCKET_UNUSED(indices), int ROCKET_UNUSED(num_indices), TextureHandle ROCKET_UNUSED(texture))
 {
-	return NULL;
+	return 0;
 }
 
 // Called by Rocket when it wants to render application-compiled geometry.

+ 2 - 2
Source/Core/StreamFile.cpp

@@ -35,7 +35,7 @@ namespace Core {
 
 StreamFile::StreamFile()
 {
-	file_handle = NULL;
+	file_handle = 0;
 	length = 0;
 }
 
@@ -74,7 +74,7 @@ void StreamFile::Close()
 	if (file_handle)
 	{
 		GetFileInterface()->Close(file_handle);
-		file_handle = NULL;
+		file_handle = 0;
 	}
 
 	length = 0;

+ 1 - 1
Source/Core/Texture.cpp

@@ -75,7 +75,7 @@ String Texture::GetSource() const
 TextureHandle Texture::GetHandle(RenderInterface* render_interface) const
 {
 	if (resource == NULL)
-		return NULL;
+		return 0;
 
 	return resource->GetHandle(render_interface);
 }