Browse Source

Additional unused parameter warning fixes

David Wimsey 11 years ago
parent
commit
fa8bff3ec6

+ 7 - 2
Include/Rocket/Core/Python/ElementInstancer.h

@@ -66,8 +66,11 @@ public:
 	/// Instances an element given the tag name and attributes
 	/// Instances an element given the tag name and attributes
 	/// @param tag Name of the element to instance
 	/// @param tag Name of the element to instance
 	/// @param attributes vector of name value pairs
 	/// @param attributes vector of name value pairs
-	virtual Element* InstanceElement(Element* ROCKET_UNUSED(parent), const Rocket::Core::String& tag, const Rocket::Core::XMLAttributes& ROCKET_UNUSED(attributes))
+	virtual Element* InstanceElement(Element* ROCKET_UNUSED_PARAMETER(parent), const Rocket::Core::String& tag, const Rocket::Core::XMLAttributes& ROCKET_UNUSED_PARAMETER(attributes))
 	{
 	{
+		ROCKET_UNUSED(parent);
+		ROCKET_UNUSED(attributes);
+
 		// Build the arguments
 		// Build the arguments
 		PyObject* args = PyTuple_New(1);
 		PyObject* args = PyTuple_New(1);
 		PyTuple_SetItem(args, 0, PyString_FromString(tag.CString()));
 		PyTuple_SetItem(args, 0, PyString_FromString(tag.CString()));
@@ -93,8 +96,10 @@ public:
 
 
 	/// Releases the given element
 	/// Releases the given element
 	/// @param element to release
 	/// @param element to release
-	virtual void ReleaseElement(Element* ROCKET_UNUSED(element))
+	virtual void ReleaseElement(Element* ROCKET_UNUSED_PARAMETER(element))
 	{
 	{
+		ROCKET_UNUSED(element);
+
 		// Never release Python elements, Python will manage this for us.
 		// Never release Python elements, Python will manage this for us.
 	}
 	}
 
 

+ 8 - 1
Samples/basic/directx/src/RenderInterfaceDirectX.cpp

@@ -64,8 +64,15 @@ RenderInterfaceDirectX::~RenderInterfaceDirectX()
 }
 }
 
 
 // Called by Rocket when it wants to render geometry that it does not wish to optimise.
 // Called by Rocket when it wants to render geometry that it does not wish to optimise.
-void RenderInterfaceDirectX::RenderGeometry(Rocket::Core::Vertex* ROCKET_UNUSED(vertices), int ROCKET_UNUSED(num_vertices), int* ROCKET_UNUSED(indices), int ROCKET_UNUSED(num_indices), const Rocket::Core::TextureHandle ROCKET_UNUSED(texture), const Rocket::Core::Vector2f& ROCKET_UNUSED(translation))
+void RenderInterfaceDirectX::RenderGeometry(Rocket::Core::Vertex* ROCKET_UNUSED_PARAMETER(vertices), int ROCKET_UNUSED_PARAMETER(num_vertices), int* ROCKET_UNUSED_PARAMETER(indices), int ROCKET_UNUSED_PARAMETER(num_indices), const Rocket::Core::TextureHandle ROCKET_UNUSED_PARAMETER(texture), const Rocket::Core::Vector2f& ROCKET_UNUSED_PARAMETER(translation))
 {
 {
+	ROCKET_UNUSED(vertices);
+	ROCKET_UNUSED(num_vertices);
+	ROCKET_UNUSED(indices);
+	ROCKET_UNUSED(num_indices);
+	ROCKET_UNUSED(texture);
+	ROCKET_UNUSED(translation);
+
 	// We've chosen to not support non-compiled geometry in the DirectX renderer. If you wanted to render non-compiled
 	// We've chosen to not support non-compiled geometry in the DirectX renderer. If you wanted to render non-compiled
 	// geometry, for example for very small sections of geometry, you could use DrawIndexedPrimitiveUP or write to a
 	// geometry, for example for very small sections of geometry, you could use DrawIndexedPrimitiveUP or write to a
 	// dynamic vertex buffer which is flushed when either the texture changes or compiled geometry is drawn.
 	// dynamic vertex buffer which is flushed when either the texture changes or compiled geometry is drawn.

+ 8 - 1
Samples/basic/ogre3d/src/RenderInterfaceOgre3D.cpp

@@ -82,8 +82,15 @@ RenderInterfaceOgre3D::~RenderInterfaceOgre3D()
 }
 }
 
 
 // Called by Rocket when it wants to render geometry that it does not wish to optimise.
 // Called by Rocket when it wants to render geometry that it does not wish to optimise.
-void RenderInterfaceOgre3D::RenderGeometry(Rocket::Core::Vertex* ROCKET_UNUSED(vertices), int ROCKET_UNUSED(num_vertices), int* ROCKET_UNUSED(indices), int ROCKET_UNUSED(num_indices), Rocket::Core::TextureHandle ROCKET_UNUSED(texture), const Rocket::Core::Vector2f& ROCKET_UNUSED(translation))
+void RenderInterfaceOgre3D::RenderGeometry(Rocket::Core::Vertex* ROCKET_UNUSED_PARAMETER(vertices), int ROCKET_UNUSED_PARAMETER(num_vertices), int* ROCKET_UNUSED_PARAMETER(indices), int ROCKET_UNUSED_PARAMETER(num_indices), Rocket::Core::TextureHandle ROCKET_UNUSED_PARAMETER(texture), const Rocket::Core::Vector2f& ROCKET_UNUSED_PARAMETER(translation))
 {
 {
+	ROCKET_UNUSED(vertices);
+	ROCKET_UNUSED(num_vertices);
+	ROCKET_UNUSED(indices);
+	ROCKET_UNUSED(num_indices);
+	ROCKET_UNUSED(texture);
+	ROCKET_UNUSED(translation);
+
 	// We've chosen to not support non-compiled geometry in the Ogre3D renderer.
 	// We've chosen to not support non-compiled geometry in the Ogre3D renderer.
 }
 }
 
 

+ 7 - 2
Samples/basic/ogre3d/src/RocketApplication.cpp

@@ -130,8 +130,10 @@ void RocketApplication::createFrameListener()
 }
 }
 
 
 // Called from Ogre before a queue group is rendered.
 // Called from Ogre before a queue group is rendered.
-void RocketApplication::renderQueueStarted(uint8 queueGroupId, const Ogre::String& invocation, bool& ROCKET_UNUSED(skipThisInvocation))
+void RocketApplication::renderQueueStarted(uint8 queueGroupId, const Ogre::String& invocation, bool& ROCKET_UNUSED_PARAMETER(skipThisInvocation))
 {
 {
+	ROCKET_UNUSED(skipThisInvocation);
+
 	if (queueGroupId == Ogre::RENDER_QUEUE_OVERLAY && Ogre::Root::getSingleton().getRenderSystem()->_getViewport()->getOverlaysEnabled())
 	if (queueGroupId == Ogre::RENDER_QUEUE_OVERLAY && Ogre::Root::getSingleton().getRenderSystem()->_getViewport()->getOverlaysEnabled())
 	{
 	{
 		context->Update();
 		context->Update();
@@ -142,8 +144,11 @@ void RocketApplication::renderQueueStarted(uint8 queueGroupId, const Ogre::Strin
 }
 }
 
 
 // Called from Ogre after a queue group is rendered.
 // Called from Ogre after a queue group is rendered.
-void RocketApplication::renderQueueEnded(uint8 ROCKET_UNUSED(queueGroupId), const Ogre::String& ROCKET_UNUSED(invocation), bool& ROCKET_UNUSED(repeatThisInvocation))
+void RocketApplication::renderQueueEnded(uint8 ROCKET_UNUSED_PARAMETER(queueGroupId), const Ogre::String& ROCKET_UNUSED_PARAMETER(invocation), bool& ROCKET_UNUSED_PARAMETER(repeatThisInvocation))
 {
 {
+	ROCKET_UNUSED(queueGroupId);
+	ROCKET_UNUSED(invocation);
+	ROCKET_UNUSED(repeatThisInvocation);
 }
 }
 
 
 // Configures Ogre's rendering system for rendering Rocket.
 // Configures Ogre's rendering system for rendering Rocket.

+ 6 - 2
Samples/basic/ogre3d/src/RocketFrameListener.cpp

@@ -61,14 +61,18 @@ bool RocketFrameListener::mouseMoved(const OIS::MouseEvent& e)
 	return true;
 	return true;
 }
 }
 
 
-bool RocketFrameListener::mousePressed(const OIS::MouseEvent& ROCKET_UNUSED(e), OIS::MouseButtonID id)
+bool RocketFrameListener::mousePressed(const OIS::MouseEvent& ROCKET_UNUSED_PARAMETER(e), OIS::MouseButtonID id)
 {
 {
+	ROCKET_UNUSED(e);
+
 	context->ProcessMouseButtonDown((int) id, GetKeyModifierState());
 	context->ProcessMouseButtonDown((int) id, GetKeyModifierState());
 	return true;
 	return true;
 }
 }
 
 
-bool RocketFrameListener::mouseReleased(const OIS::MouseEvent& ROCKET_UNUSED(e), OIS::MouseButtonID id)
+bool RocketFrameListener::mouseReleased(const OIS::MouseEvent& ROCKET_UNUSED_PARAMETER(e), OIS::MouseButtonID id)
 {
 {
+	ROCKET_UNUSED(e);
+
 	context->ProcessMouseButtonUp((int) id, GetKeyModifierState());
 	context->ProcessMouseButtonUp((int) id, GetKeyModifierState());
 	return true;
 	return true;
 }
 }

+ 11 - 2
Samples/basic/ogre3d/src/main.cpp

@@ -29,11 +29,20 @@
 
 
 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
 #include <windows.h>
 #include <windows.h>
-int APIENTRY WinMain(HINSTANCE ROCKET_UNUSED(instance_handle), HINSTANCE ROCKET_UNUSED(previous_instance_handle), char* ROCKET_UNUSED(command_line), int ROCKET_UNUSED(command_show))
+int APIENTRY WinMain(HINSTANCE ROCKET_UNUSED_PARAMETER(instance_handle), HINSTANCE ROCKET_UNUSED_PARAMETER(previous_instance_handle), char* ROCKET_UNUSED_PARAMETER(command_line), int ROCKET_UNUSED_PARAMETER(command_show))
 #else
 #else
-int main(int ROCKET_UNUSED(argc), char** ROCKET_UNUSED(argv))
+int main(int ROCKET_UNUSED_PARAMETER(argc), char** ROCKET_UNUSED_PARAMETER(argv))
 #endif
 #endif
 {
 {
+#ifdef ROCKET_PLATFORM_WIN32
+        ROCKET_UNUSED(instance_handle);
+        ROCKET_UNUSED(previous_instance_handle);
+        ROCKET_UNUSED(command_line);
+        ROCKET_UNUSED(command_show);
+#else
+        ROCKET_UNUSED(argc);
+        ROCKET_UNUSED(argv);
+#endif
 	RocketApplication application;
 	RocketApplication application;
 	try
 	try
 	{
 	{

+ 1 - 1
Samples/pyinvaders/src/DecoratorDefender.cpp

@@ -55,7 +55,7 @@ Rocket::Core::DecoratorDataHandle DecoratorDefender::GenerateElementData(Rocket:
 }
 }
 
 
 // Called to release element data generated by this decorator.
 // Called to release element data generated by this decorator.
-void DecoratorDefender::ReleaseElementData(Rocket::Core::DecoratorDataHandle ROCKET_UNUSED(element_data))
+void DecoratorDefender::ReleaseElementData(Rocket::Core::DecoratorDataHandle ROCKET_UNUSED_PARAMETER(element_data))
 {
 {
 		ROCKET_UNUSED(element_data);
 		ROCKET_UNUSED(element_data);
 }
 }

+ 3 - 1
Samples/pyinvaders/src/DecoratorInstancerStarfield.cpp

@@ -46,8 +46,10 @@ DecoratorInstancerStarfield::~DecoratorInstancerStarfield()
 }
 }
 
 
 // Instances a decorator given the property tag and attributes from the RCSS file.
 // Instances a decorator given the property tag and attributes from the RCSS file.
-Rocket::Core::Decorator* DecoratorInstancerStarfield::InstanceDecorator(const Rocket::Core::String& ROCKET_UNUSED(name), const Rocket::Core::PropertyDictionary& properties)
+Rocket::Core::Decorator* DecoratorInstancerStarfield::InstanceDecorator(const Rocket::Core::String& ROCKET_UNUSED_PARAMETER(name), const Rocket::Core::PropertyDictionary& properties)
 {
 {
+	ROCKET_UNUSED(name);
+
 	int num_layers = Rocket::Core::Math::RealToInteger(properties.GetProperty("num-layers")->Get< float >());
 	int num_layers = Rocket::Core::Math::RealToInteger(properties.GetProperty("num-layers")->Get< float >());
 	Rocket::Core::Colourb top_colour = properties.GetProperty("top-colour")->Get< Rocket::Core::Colourb >();
 	Rocket::Core::Colourb top_colour = properties.GetProperty("top-colour")->Get< Rocket::Core::Colourb >();
 	Rocket::Core::Colourb bottom_colour = properties.GetProperty("bottom-colour")->Get< Rocket::Core::Colourb >();
 	Rocket::Core::Colourb bottom_colour = properties.GetProperty("bottom-colour")->Get< Rocket::Core::Colourb >();

+ 3 - 1
Source/Core/ElementUtilities.cpp

@@ -375,8 +375,10 @@ bool ElementUtilities::PositionElement(Element* element, const Vector2f& offset,
 }
 }
 /*
 /*
 // Returns true if the element is visible within the current clipping region (if any), false if not.
 // Returns true if the element is visible within the current clipping region (if any), false if not.
-static bool IsElementVisible(const Element* ROCKET_UNUSED(element))
+static bool IsElementVisible(const Element* ROCKET_UNUSED_PARAMETER(element))
 {
 {
+	ROCKET_UNUSED(element);
+
 	// Fix this when text elements have their sizes correctly set!
 	// Fix this when text elements have their sizes correctly set!
 	return true;
 	return true;
 
 

+ 2 - 1
Source/Core/Python/ContextInstancer.cpp

@@ -69,8 +69,9 @@ Context* ContextInstancer::InstanceContext(const Rocket::Core::String& name)
 }
 }
 
 
 // Releases a context previously created by this context.
 // Releases a context previously created by this context.
-void ContextInstancer::ReleaseContext(Context* ROCKET_UNUSED(context))
+void ContextInstancer::ReleaseContext(Context* ROCKET_UNUSED_PARAMETER(context))
 {
 {
+	ROCKET_UNUSED(context);
 }
 }
 
 
 // Releases this context instancer
 // Releases this context instancer

+ 9 - 3
Source/Core/Python/ContextProxy.cpp

@@ -38,8 +38,10 @@ namespace Python {
 class ContextLenAccessor
 class ContextLenAccessor
 {
 {
 public:
 public:
-	int operator()(ContextProxy& ROCKET_UNUSED(proxy))
+	int operator()(ContextProxy& ROCKET_UNUSED_PARAMETER(proxy))
 	{
 	{
+		ROCKET_UNUSED(proxy);
+
 		return GetNumContexts();
 		return GetNumContexts();
 	}
 	}
 };
 };
@@ -47,8 +49,10 @@ public:
 class ContextIndexAccessor
 class ContextIndexAccessor
 {
 {
 public:
 public:
-	Context* operator()(ContextProxy& ROCKET_UNUSED(proxy), int index)
+	Context* operator()(ContextProxy& ROCKET_UNUSED_PARAMETER(proxy), int index)
 	{
 	{
+		ROCKET_UNUSED(proxy);
+
 		return GetContext(index);
 		return GetContext(index);
 	}
 	}
 };
 };
@@ -56,8 +60,10 @@ public:
 class ContextNameAccessor
 class ContextNameAccessor
 {
 {
 public:
 public:
-	Context* operator()(ContextProxy& ROCKET_UNUSED(proxy), const Rocket::Core::String& name)
+	Context* operator()(ContextProxy& ROCKET_UNUSED_PARAMETER(proxy), const Rocket::Core::String& name)
 	{
 	{
+		ROCKET_UNUSED(proxy);
+
 		return GetContext(name);
 		return GetContext(name);
 	}
 	}
 };
 };