Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBaneTrapper

Posted 25 December 2012 - 02:16 PM

Hello.
I am just being annoyed by a warning and i cant find how to remove them =,= srsly....

Warning :: "warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data"
Am doing something like this
void setTextPosition(float a, float b); int main(){    setTextPosition(static_cast<int>(posX), static_cast<int>(posY)); //Note posX and posY are floats and i really need to pass int values the setTextPosition is a sfml2.0 function and i don't want to mess with sfml code}
The question:
How do i remove warning in "Visual studio 2010" for specified line/lines

#2BaneTrapper

Posted 24 December 2012 - 03:46 PM

Hello.
I am just being annoyed by a warning and i cant find how to remove them =,= srsly....

Warning :: "warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data"
Am doing something like this

void setTextPosition(float a, float b); int main(){    setTextPosition(static_cast(posX), static_cast(posY)); //Note posX and posY are floats and i really need to pass int values the setTextPosition is a sfml2.0 function and i don't want to mess with sfml code}

The question:
How do i remove warning in "Visual studio 2010" for specified line/lines


#1BaneTrapper

Posted 24 December 2012 - 03:45 PM

Hello.

I am just being annoyed by a warning and i cant find how to remove them =,= srsly....

 

Warning :: "warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data"

Am doing something like this

void setTextPosition(float a, float b);
 
int main()
{
    setTextPosition(static_cast<int>(posX), static_cast<int>(posY)); //Note posX and posY are floats and i really need to pass int values the setTextPosition is a sfml2.0 function and i don't want to mess with sfml code
}

 

The question:
How do i remove warning in "Visual studio 2010" for specified line/lines


PARTNERS