changeset 664:61a5f86a0db3

* Fixed the warnings that were introduced by the light branch merge.
author helios2000@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 08 Nov 2010 15:46:48 +0000
parents 6e53cc43402e
children 0a798d5c241a
files engine/core/controller/enginesettings.cpp engine/core/view/renderers/instancerenderer.cpp engine/core/view/renderers/lightrenderer.h
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/engine/core/controller/enginesettings.cpp	Sun Nov 07 21:45:23 2010 +0000
+++ b/engine/core/controller/enginesettings.cpp	Mon Nov 08 15:46:48 2010 +0000
@@ -50,8 +50,8 @@
 		m_defaultfontpath(""),
 		m_defaultfontsize(8),
 		m_defaultfontglyphs(""),
-		m_lighting(0),
-		m_iscolorkeyenabled(false){
+		m_iscolorkeyenabled(false),
+		m_lighting(0) {
 			m_colorkey.r = 255;
 			m_colorkey.g = 0;
 			m_colorkey.b = 255;
--- a/engine/core/view/renderers/instancerenderer.cpp	Sun Nov 07 21:45:23 2010 +0000
+++ b/engine/core/view/renderers/instancerenderer.cpp	Mon Nov 08 15:46:48 2010 +0000
@@ -168,7 +168,7 @@
 					std::string str_name = instance->getObject()->getNamespace();
 					std::list<std::string>::iterator group_it = infoa.groups.begin();
 					for(;group_it != infoa.groups.end(); ++group_it) {
-						if(str_name.find((*group_it)) != -1) {
+						if(str_name.find((*group_it)) != std::string::npos) {
 							ScreenPoint p;
 							Rect rec;
 							p = cam->toScreenCoordinates(infoa.instance->getLocation().getMapCoordinates());
@@ -218,7 +218,7 @@
 					std::string lit_name = instance->getObject()->getNamespace();
 					std::list<std::string>::iterator unlit_it = m_unlit_groups.begin();
 					for(;unlit_it != m_unlit_groups.end(); ++unlit_it) {
-						if(lit_name.find(*unlit_it) != -1) {
+						if(lit_name.find(*unlit_it) != std::string::npos) {
 							m_renderbackend->setStencilTest(255, 2, 7);
 							found = true;
 							break;
@@ -479,7 +479,7 @@
 		for(;group_it != groups.end(); ++group_it) {
 			std::list<std::string>::iterator unlit_it = m_unlit_groups.begin();
 			for(;unlit_it != m_unlit_groups.end(); ++unlit_it) {
-				if((*group_it).find(*unlit_it) != -1) {
+				if((*group_it).find(*unlit_it) != std::string::npos) {
 					m_unlit_groups.remove(*unlit_it);
 					break;
 				}
--- a/engine/core/view/renderers/lightrenderer.h	Sun Nov 07 21:45:23 2010 +0000
+++ b/engine/core/view/renderers/lightrenderer.h	Mon Nov 08 15:46:48 2010 +0000
@@ -97,7 +97,7 @@
 		virtual int getStencil() { return 0; };
 		virtual float getAlpha() { return 0; };
 		virtual void removeStencil() {};
-		virtual std::vector<uint8_t> getColor() {};
+		virtual std::vector<uint8_t> getColor() { return std::vector<uint8_t>(); };
 		virtual float getRadius() { return 0; };
 		virtual int getSubdivisions() { return 0; };
 		virtual float getXStretch() { return 0; };