Anrdoid: not workable code

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Post Reply
User avatar
Denis_
Halfling
Posts: 43
Joined: Thu Jan 04, 2007 1:43 pm
Location: Belarus
Contact:

Anrdoid: not workable code

Post by Denis_ » Mon Apr 08, 2013 4:28 pm

That code on Android doesn't work correctly:

Code: Select all

    Real StringConverter::parseReal(const String& val, Real defaultValue)
    {
#if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID
		Real ret = 0;
		int n = sscanf(val.c_str(), "%f", &ret);
		
		if(n == 0){
			// Nothing read, so try integer format
			int ret2 = 0;
			n = sscanf(val.c_str(), "%d", &ret2);
			if(n == 1)
				ret = (Real)ret2;
		}
#else
0 x
Image

User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 1
Contact:

Re: Anrdoid: not workable code

Post by Wolfmanfx » Mon Apr 08, 2013 5:08 pm

This code were added before the ndk i have removed much of that code and sticked with c++ - i am going to remove this too.
0 x

Post Reply