aboutsummaryrefslogtreecommitdiff
path: root/src/chips
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-05-01 20:02:09 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-05-01 20:02:09 +0300
commit5a194eb263125e5505cca3ec0256c7efa348eaa4 (patch)
treef655dd29013d0cf41d04ba5bb81e8750c9a4fcc1 /src/chips
parent7fd5752dd5f22bdbe175744f33ad998e43f755cf (diff)
parent49ab43701d5c5800fda3543a9697e5aab2da2638 (diff)
downloadlibADLMIDI-5a194eb263125e5505cca3ec0256c7efa348eaa4.tar.gz
libADLMIDI-5a194eb263125e5505cca3ec0256c7efa348eaa4.tar.bz2
libADLMIDI-5a194eb263125e5505cca3ec0256c7efa348eaa4.zip
Merge branch 'master' into stable
Diffstat (limited to 'src/chips')
-rw-r--r--src/chips/dosbox/dbopl.cpp10
-rw-r--r--src/chips/opl_chip_base.h3
2 files changed, 6 insertions, 7 deletions
diff --git a/src/chips/dosbox/dbopl.cpp b/src/chips/dosbox/dbopl.cpp
index 8834524..3e21772 100644
--- a/src/chips/dosbox/dbopl.cpp
+++ b/src/chips/dosbox/dbopl.cpp
@@ -1875,8 +1875,8 @@ namespace DBOPL
if(i >= 16)
index += 9;
- Bitu blah = reinterpret_cast<Bitu>(&(chip->chan[ index ]));
- ChanOffsetTable[i] = blah;
+ intptr_t blah = reinterpret_cast<intptr_t>(&(chip->chan[ index ]));
+ ChanOffsetTable[i] = static_cast<Bit16u>(blah);
}
//Same for operators
@@ -1895,9 +1895,9 @@ namespace DBOPL
chNum += 16 - 12;
Bitu opNum = (i % 8) / 3;
- DBOPL::Channel *chan = 0;
- Bitu blah = reinterpret_cast<Bitu>(&(chan->op[opNum]));
- OpOffsetTable[i] = ChanOffsetTable[ chNum ] + blah;
+ DBOPL::Channel *chan = NULL;
+ intptr_t blah = reinterpret_cast<intptr_t>(&(chan->op[opNum]));
+ OpOffsetTable[i] = static_cast<Bit16u>((intptr_t)ChanOffsetTable[ chNum ] + blah);
}
#if 0
diff --git a/src/chips/opl_chip_base.h b/src/chips/opl_chip_base.h
index 75dd903..fb9b9e9 100644
--- a/src/chips/opl_chip_base.h
+++ b/src/chips/opl_chip_base.h
@@ -4,8 +4,7 @@
#include <stdint.h>
#include <stddef.h>
-/* TODO: MSVC: Use MSVC versioing instead of this to detect does it supports those C++11 keywords or not */
-#if __cplusplus <= 199711L
+#if !defined(_MSC_VER) && (__cplusplus <= 199711L)
#define final
#define override
#endif