Fixed MSVC compilation

This commit is contained in:
Andreas Huggel 2005-04-21 08:11:47 +00:00
parent 56a7b11072
commit b8e809195c
3 changed files with 23 additions and 5 deletions

View File

@ -289,6 +289,21 @@
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\sonymn.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\tags.cpp">
<FileConfiguration
@ -393,6 +408,9 @@
<File
RelativePath="..\..\src\sigmamn.hpp">
</File>
<File
RelativePath="..\..\src\sonymn.hpp">
</File>
<File
RelativePath="..\..\src\tags.hpp">
</File>

View File

@ -900,16 +900,16 @@ namespace {
val = -val;
}
// remove fraction
float frac = val & 0x1f;
float frac = static_cast<float>(val & 0x1f);
val -= long(frac);
// convert 1/3 (0x0c) and 2/3 (0x14) codes
if (frac == 0x0c) {
frac = 32.0 / 3;
frac = 32.0f / 3;
}
else if (frac == 0x14) {
frac = 64.0 / 3;
frac = 64.0f / 3;
}
return sign * (val + frac) / 32.0;
return sign * (val + frac) / 32.0f;
}
}

View File

@ -635,7 +635,7 @@ namespace Exiv2 {
{
// Decoded by Robert Rottmerhusen <email@rottmerhusen.com>
if (value.size() != 4) return os << "(" << value << ")";
float a = value.toLong(0);
float a = value.toFloat(0);
long b = value.toLong(1);
long c = value.toLong(2);
if (c == 0) return os << "(" << value << ")";