Commit c90a2c19 authored by hybrid's avatar hybrid

Use new strtoul10 method where appropriate.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3676 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 5d3424f5
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9.00"
Name="22.MaterialViewer_vc9" Name="22.MaterialViewer_vc9"
ProjectGUID="{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}" ProjectGUID="{F4C8112D-57A8-4D01-BB62-BAC6A09A6902}"
RootNamespace="MaterialViewer_vc9" RootNamespace="MaterialViewer_vc9"
TargetFrameworkVersion="131072" TargetFrameworkVersion="131072"
> >
......
...@@ -227,41 +227,37 @@ protected: ...@@ -227,41 +227,37 @@ protected:
{ {
video::SColor col; video::SColor col;
u32 alpha=col.getAlpha(); if (EditAlpha)
if ( EditAlpha )
{ {
alpha = (u32)core::strtol10( core::stringc( EditAlpha->getText() ).c_str(), 0); u32 alpha = core::strtoul10(core::stringc(EditAlpha->getText()).c_str());
if ( alpha > 255 ) if (alpha > 255)
alpha = 255; alpha = 255;
col.setAlpha(alpha);
} }
col.setAlpha(alpha);
u32 red=col.getRed(); if (EditRed)
if ( EditRed )
{ {
red = (u32)core::strtol10( core::stringc( EditRed->getText() ).c_str(), 0); u32 red = core::strtoul10(core::stringc(EditRed->getText()).c_str());
if ( red > 255 ) if (red > 255)
red = 255; red = 255;
col.setRed(red);
} }
col.setRed(red);
u32 green=col.getGreen(); if (EditGreen)
if ( EditGreen )
{ {
green = (u32)core::strtol10( core::stringc( EditGreen->getText() ).c_str(), 0); u32 green = core::strtoul10(core::stringc(EditGreen->getText()).c_str());
if ( green > 255 ) if (green > 255)
green = 255; green = 255;
col.setGreen(green);
} }
col.setGreen(green);
u32 blue=col.getBlue(); if (EditBlue)
if ( EditBlue )
{ {
blue = (u32)core::strtol10( core::stringc( EditBlue->getText() ).c_str(), 0); u32 blue = core::strtoul10(core::stringc(EditBlue->getText()).c_str());
if ( blue > 255 ) if (blue > 255)
blue = 255; blue = 255;
col.setBlue(blue);
} }
col.setBlue(blue);
return col; return col;
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment