Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MediaArea/ZenLib.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme Martinez <jerome@mediaarea.net>2020-05-15 11:45:02 +0300
committerGitHub <noreply@github.com>2020-05-15 11:45:02 +0300
commitc59614778341e52fbdea4c18ea66c2712ef3e83c (patch)
tree3378a1030f538f1f9374bc2a278d7af6afa03fa8
parent3fa136da5aeb067ca73b1b1de7d2e24f0150989d (diff)
parent55b48f70a6d76c4a7abdc62d183ec5cd370771c2 (diff)
Merge pull request #115 from bugwelle/fix-warnings
Ztring.cpp: fix implicit float-to-double conversion warning
-rw-r--r--.gitignore1
-rw-r--r--Source/ZenLib/Utils.cpp4
-rw-r--r--Source/ZenLib/Ztring.cpp16
3 files changed, 11 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index a69b5f8..be774c7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@
*.zip
__history
bin
+Build/
Debug
Debug_Ansi
Debug_Build
diff --git a/Source/ZenLib/Utils.cpp b/Source/ZenLib/Utils.cpp
index a7ccb45..7f6daf4 100644
--- a/Source/ZenLib/Utils.cpp
+++ b/Source/ZenLib/Utils.cpp
@@ -982,7 +982,7 @@ int32s float32_int32s (float32 F, bool Rounded)
return (int32s)F;
//Rounded
int I1=(int)F;
- if (F-I1>=0.5)
+ if (F-I1>=0.5f)
return I1+1;
else
return I1;
@@ -1001,7 +1001,7 @@ int64s float32_int64s (float32 F, bool Rounded)
return (int64s)F;
//Rounded
int I1=(int)F;
- if (F-I1>=0.5)
+ if (F-I1>=0.5f)
return I1+1;
else
return I1;
diff --git a/Source/ZenLib/Ztring.cpp b/Source/ZenLib/Ztring.cpp
index 6b705c3..500b200 100644
--- a/Source/ZenLib/Ztring.cpp
+++ b/Source/ZenLib/Ztring.cpp
@@ -1855,7 +1855,7 @@ int8s Ztring::To_int8s (int8u Radix, ztring_t Options) const
{
float80 F=To_float80();
F-=I;
- if (F>=0.5)
+ if (F>=0.5f)
return (int8s)I+1;
}
@@ -1893,7 +1893,7 @@ int8u Ztring::To_int8u (int8u Radix, ztring_t Options) const
{
float32 F=To_float32();
F-=I;
- if (F>=0.5)
+ if (F>=0.5f)
return (int8u)I+1;
}
@@ -1931,7 +1931,7 @@ int16s Ztring::To_int16s (int8u Radix, ztring_t Options) const
{
float80 F=To_float80();
F-=I;
- if (F>=0.5)
+ if (F>=0.5f)
return (int16s)I+1;
}
@@ -1969,7 +1969,7 @@ int16u Ztring::To_int16u (int8u Radix, ztring_t Options) const
{
float32 F=To_float32();
F-=I;
- if (F>=0.5)
+ if (F>=0.5f)
return (int16u)I+1;
}
@@ -2007,7 +2007,7 @@ int32s Ztring::To_int32s (int8u Radix, ztring_t Options) const
{
float80 F=To_float80();
F-=I;
- if (F>=0.5)
+ if (F>=0.5f)
return I+1;
}
@@ -2045,7 +2045,7 @@ int32u Ztring::To_int32u (int8u Radix, ztring_t Options) const
{
float32 F=To_float32();
F-=I;
- if (F>=0.5)
+ if (F>=0.5f)
return I+1;
}
@@ -2083,7 +2083,7 @@ int64s Ztring::To_int64s (int8u Radix, ztring_t Options) const
{
float32 F=To_float32();
F-=I;
- if (F>0.5)
+ if (F>0.5f)
return I+1;
}
@@ -2121,7 +2121,7 @@ int64u Ztring::To_int64u (int8u Radix, ztring_t Options) const
{
float32 F=To_float32();
F-=I;
- if (F>=0.5)
+ if (F>=0.5f)
return I+1;
}