Page 1 of 1

Anrdoid: not workable code

Posted: Mon Apr 08, 2013 4:28 pm
by Denis_
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

Re: Anrdoid: not workable code

Posted: Mon Apr 08, 2013 5:08 pm
by Wolfmanfx
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.