Browse Source

Fixed build.

Branimir Karadžić 8 years ago
parent
commit
5df4969527

+ 3 - 3
examples/common/entry/entry_android.cpp

@@ -86,7 +86,7 @@ namespace entry
 	struct MainThreadEntry
 	struct MainThreadEntry
 	{
 	{
 		int m_argc;
 		int m_argc;
-		char** m_argv;
+		const char* const* m_argv;
 
 
 		static int32_t threadFunc(void* _userData);
 		static int32_t threadFunc(void* _userData);
 	};
 	};
@@ -119,9 +119,9 @@ namespace entry
 				, 0
 				, 0
 				);
 				);
 
 
-			const char* argv[1] = { "android.so" };
+			const char* const argv[1] = { "android.so" };
 			m_mte.m_argc = 1;
 			m_mte.m_argc = 1;
-			m_mte.m_argv = const_cast<char**>(argv);
+			m_mte.m_argv = argv;
 
 
 			while (0 == m_app->destroyRequested)
 			while (0 == m_app->destroyRequested)
 			{
 			{

+ 2 - 2
examples/common/entry/entry_asmjs.cpp

@@ -86,7 +86,7 @@ namespace entry
 			}
 			}
 		}
 		}
 
 
-		int32_t run(int _argc, char** _argv)
+		int32_t run(int _argc, const char* const* _argv)
 		{
 		{
 			emscripten_set_mousedown_callback("#canvas", this, true, mouseCb);
 			emscripten_set_mousedown_callback("#canvas", this, true, mouseCb);
 			emscripten_set_mouseup_callback("#canvas", this, true, mouseCb);
 			emscripten_set_mouseup_callback("#canvas", this, true, mouseCb);
@@ -397,7 +397,7 @@ namespace entry
 	}
 	}
 }
 }
 
 
-int main(int _argc, char** _argv)
+int main(int _argc, const char* const* _argv)
 {
 {
 	using namespace entry;
 	using namespace entry;
 	return s_ctx.run(_argc, _argv);
 	return s_ctx.run(_argc, _argv);

+ 6 - 6
examples/common/entry/entry_ios.mm

@@ -27,7 +27,7 @@ namespace entry
 	struct MainThreadEntry
 	struct MainThreadEntry
 	{
 	{
 		int m_argc;
 		int m_argc;
-		char** m_argv;
+		const char* const* m_argv;
 
 
 		static int32_t threadFunc(void* _userData);
 		static int32_t threadFunc(void* _userData);
 	};
 	};
@@ -38,9 +38,9 @@ namespace entry
 	{
 	{
 		Context(uint32_t _width, uint32_t _height)
 		Context(uint32_t _width, uint32_t _height)
 		{
 		{
-			static const char* argv[1] = { "ios" };
+			const char* const argv[1] = { "ios" };
 			m_mte.m_argc = 1;
 			m_mte.m_argc = 1;
-			m_mte.m_argv = const_cast<char**>(argv);
+			m_mte.m_argv = argv;
 
 
 			m_eventQueue.postSizeEvent(s_defaultWindow, _width, _height);
 			m_eventQueue.postSizeEvent(s_defaultWindow, _width, _height);
 
 
@@ -261,7 +261,7 @@ static	void* m_device = NULL;
 	CGPoint touchLocation = [touch locationInView:self];
 	CGPoint touchLocation = [touch locationInView:self];
 	touchLocation.x *= self.contentScaleFactor;
 	touchLocation.x *= self.contentScaleFactor;
 	touchLocation.y *= self.contentScaleFactor;
 	touchLocation.y *= self.contentScaleFactor;
-	
+
 	s_ctx->m_eventQueue.postMouseEvent(s_defaultWindow, touchLocation.x, touchLocation.y, 0, MouseButton::Left, false);
 	s_ctx->m_eventQueue.postMouseEvent(s_defaultWindow, touchLocation.x, touchLocation.y, 0, MouseButton::Left, false);
 }
 }
 
 
@@ -283,7 +283,7 @@ static	void* m_device = NULL;
 	CGPoint touchLocation = [touch locationInView:self];
 	CGPoint touchLocation = [touch locationInView:self];
 	touchLocation.x *= self.contentScaleFactor;
 	touchLocation.x *= self.contentScaleFactor;
 	touchLocation.y *= self.contentScaleFactor;
 	touchLocation.y *= self.contentScaleFactor;
-	
+
 	s_ctx->m_eventQueue.postMouseEvent(s_defaultWindow, touchLocation.x, touchLocation.y, 0, MouseButton::Left, false);
 	s_ctx->m_eventQueue.postMouseEvent(s_defaultWindow, touchLocation.x, touchLocation.y, 0, MouseButton::Left, false);
 }
 }
 
 
@@ -371,7 +371,7 @@ static	void* m_device = NULL;
 
 
 @end
 @end
 
 
-int main(int _argc, char* _argv[])
+int main(int _argc, const char* const* _argv)
 {
 {
 	NSAutoreleasePool* pool = [ [NSAutoreleasePool alloc] init];
 	NSAutoreleasePool* pool = [ [NSAutoreleasePool alloc] init];
 	int exitCode = UIApplicationMain(_argc, _argv, @"UIApplication", NSStringFromClass([AppDelegate class]) );
 	int exitCode = UIApplicationMain(_argc, _argv, @"UIApplication", NSStringFromClass([AppDelegate class]) );

+ 1 - 1
examples/common/entry/entry_noop.cpp

@@ -71,7 +71,7 @@ namespace entry
 
 
 } // namespace entry
 } // namespace entry
 
 
-int main(int _argc, char** _argv)
+int main(int _argc, const char* const* _argv)
 {
 {
 	entry::main(_argc, _argv);
 	entry::main(_argc, _argv);
 }
 }

+ 3 - 3
examples/common/entry/entry_osx.mm

@@ -64,7 +64,7 @@ namespace entry
 	struct MainThreadEntry
 	struct MainThreadEntry
 	{
 	{
 		int m_argc;
 		int m_argc;
-		char** m_argv;
+		const char* const* m_argv;
 
 
 		static int32_t threadFunc(void* _userData)
 		static int32_t threadFunc(void* _userData)
 		{
 		{
@@ -409,7 +409,7 @@ namespace entry
 			m_eventQueue.postSuspendEvent(s_defaultWindow, Suspend::DidSuspend);
 			m_eventQueue.postSuspendEvent(s_defaultWindow, Suspend::DidSuspend);
 		}
 		}
 
 
-		int32_t run(int _argc, char** _argv)
+		int32_t run(int _argc, const char* const* _argv)
 		{
 		{
 			[NSApplication sharedApplication];
 			[NSApplication sharedApplication];
 
 
@@ -767,7 +767,7 @@ namespace entry
 
 
 @end
 @end
 
 
-int main(int _argc, char** _argv)
+int main(int _argc, const char* const* _argv)
 {
 {
 	using namespace entry;
 	using namespace entry;
 	return s_ctx.run(_argc, _argv);
 	return s_ctx.run(_argc, _argv);

+ 3 - 3
examples/common/entry/entry_windows.cpp

@@ -311,7 +311,7 @@ namespace entry
 	struct MainThreadEntry
 	struct MainThreadEntry
 	{
 	{
 		int m_argc;
 		int m_argc;
-		char** m_argv;
+		const char* const* m_argv;
 
 
 		static int32_t threadFunc(void* _userData);
 		static int32_t threadFunc(void* _userData);
 	};
 	};
@@ -445,7 +445,7 @@ namespace entry
 			s_translateKey[uint8_t('Z')]  = Key::KeyZ;
 			s_translateKey[uint8_t('Z')]  = Key::KeyZ;
 		}
 		}
 
 
-		int32_t run(int _argc, char** _argv)
+		int32_t run(int _argc, const char* const* _argv)
 		{
 		{
 			SetDllDirectoryA(".");
 			SetDllDirectoryA(".");
 
 
@@ -1095,7 +1095,7 @@ namespace entry
 
 
 } // namespace entry
 } // namespace entry
 
 
-int main(int _argc, char** _argv)
+int main(int _argc, const char* const* _argv)
 {
 {
 	using namespace entry;
 	using namespace entry;
 	return s_ctx.run(_argc, _argv);
 	return s_ctx.run(_argc, _argv);

+ 1 - 1
examples/common/entry/entry_winrt.cx

@@ -24,7 +24,7 @@ using namespace Windows::Graphics::Display;
 #endif // BX_PLATFORM_WINRT
 #endif // BX_PLATFORM_WINRT
 using namespace Platform;
 using namespace Platform;
 
 
-static char* g_emptyArgs[] = { "" };
+static const char* const g_emptyArgs[] = { "" };
 static entry::WindowHandle g_defaultWindow = { 0 };
 static entry::WindowHandle g_defaultWindow = { 0 };
 static entry::EventQueue g_eventQueue;
 static entry::EventQueue g_eventQueue;