|
From: <man...@us...> - 2014-03-18 09:53:09
|
Revision: 3899
http://sourceforge.net/p/modplug/code/3899
Author: manxorist
Date: 2014-03-18 09:53:02 +0000 (Tue, 18 Mar 2014)
Log Message:
-----------
[Ref] Silence MSVC warnings.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_dmf.cpp
trunk/OpenMPT/soundlib/modcommand.cpp
Modified: trunk/OpenMPT/soundlib/Load_dmf.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_dmf.cpp 2014-03-18 09:43:33 UTC (rev 3898)
+++ trunk/OpenMPT/soundlib/Load_dmf.cpp 2014-03-18 09:53:02 UTC (rev 3899)
@@ -279,8 +279,8 @@
{
uint8 ontime = (val >> 4);
uint8 offtime = (val & 0x0F);
- ontime = Clamp(ontime * internalTicks / 15, 1, 15);
- offtime = Clamp(offtime * internalTicks / 15, 1, 15);
+ ontime = static_cast<uint8>(Clamp(ontime * internalTicks / 15, 1, 15));
+ offtime = static_cast<uint8>(Clamp(offtime * internalTicks / 15, 1, 15));
return (ontime << 4) | offtime;
}
@@ -742,7 +742,7 @@
useMem2 = true;
break;
case 7: // Scratch to Note (neat! but we don't have such an effect...)
- m->note = Clamp(effectParam2 + 25, NOTE_MIN, NOTE_MAX);
+ m->note = static_cast<ModCommand::NOTE>(Clamp(effectParam2 + 25, NOTE_MIN, NOTE_MAX));
effect2 = CMD_TONEPORTAMENTO;
effectParam2 = 0xFF;
useMem2 = true;
Modified: trunk/OpenMPT/soundlib/modcommand.cpp
===================================================================
--- trunk/OpenMPT/soundlib/modcommand.cpp 2014-03-18 09:43:33 UTC (rev 3898)
+++ trunk/OpenMPT/soundlib/modcommand.cpp 2014-03-18 09:53:02 UTC (rev 3899)
@@ -556,7 +556,7 @@
case VOLCMD_PANNING:
command = CMD_PANNING8;
- param = Clamp(vol << 2, 0, 0xFF);
+ param = mpt::saturate_cast<uint8>(vol << 2);
break;
case VOLCMD_VOLSLIDEDOWN:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|