mirror of
https://github.com/libretro/bsnes-libretro-cplusplus98.git
synced 2025-04-13 15:40:27 +00:00
Fix compile for Clang++.
This commit is contained in:
parent
1d5552d4f0
commit
d27f290800
@ -167,23 +167,23 @@ namespace nall {
|
||||
static inline string substr(const char *src, unsigned start = 0, unsigned length = 0);
|
||||
static inline string& strtr(string &dest, const char *before, const char *after);
|
||||
|
||||
inline string integer(intmax_t value);
|
||||
template<unsigned length> inline string linteger(intmax_t value);
|
||||
template<unsigned length> inline string rinteger(intmax_t value);
|
||||
inline string decimal(uintmax_t value);
|
||||
template<unsigned length> inline string ldecimal(uintmax_t value);
|
||||
template<unsigned length> inline string rdecimal(uintmax_t value);
|
||||
template<unsigned length> inline string hex(uintmax_t value);
|
||||
template<unsigned length> inline string binary(uintmax_t value);
|
||||
inline unsigned fp(char *str, double value);
|
||||
inline string fp(double value);
|
||||
static inline string integer(intmax_t value);
|
||||
template<unsigned length> static inline string linteger(intmax_t value);
|
||||
template<unsigned length> static inline string rinteger(intmax_t value);
|
||||
static inline string decimal(uintmax_t value);
|
||||
template<unsigned length> static inline string ldecimal(uintmax_t value);
|
||||
template<unsigned length> static inline string rdecimal(uintmax_t value);
|
||||
template<unsigned length> static inline string hex(uintmax_t value);
|
||||
template<unsigned length> static inline string binary(uintmax_t value);
|
||||
static inline unsigned fp(char *str, double value);
|
||||
static inline string fp(double value);
|
||||
|
||||
inline string linteger(intmax_t value) { return linteger<0>(value); }
|
||||
inline string rinteger(intmax_t value) { return rinteger<0>(value); }
|
||||
inline string ldecimal(uintmax_t value) { return ldecimal<0>(value); }
|
||||
inline string rdecimal(uintmax_t value) { return rdecimal<0>(value); }
|
||||
inline string hex(uintmax_t value) { return hex<0>(value); }
|
||||
inline string binary(uintmax_t value) { return binary<0>(value); }
|
||||
static inline string linteger(intmax_t value) { return linteger<0>(value); }
|
||||
static inline string rinteger(intmax_t value) { return rinteger<0>(value); }
|
||||
static inline string ldecimal(uintmax_t value) { return ldecimal<0>(value); }
|
||||
static inline string rdecimal(uintmax_t value) { return rdecimal<0>(value); }
|
||||
static inline string hex(uintmax_t value) { return hex<0>(value); }
|
||||
static inline string binary(uintmax_t value) { return binary<0>(value); }
|
||||
|
||||
//variadic.hpp
|
||||
template <typename T1>
|
||||
|
@ -50,7 +50,7 @@ string integer(intmax_t value) {
|
||||
result[x] = buffer[y];
|
||||
}
|
||||
|
||||
return result;
|
||||
return &result[0];
|
||||
}
|
||||
|
||||
template<unsigned length> string linteger(intmax_t value) {
|
||||
@ -124,7 +124,7 @@ string decimal(uintmax_t value) {
|
||||
result[x] = buffer[y];
|
||||
}
|
||||
|
||||
return result;
|
||||
return &result[0];
|
||||
}
|
||||
|
||||
template<unsigned length> string ldecimal(uintmax_t value) {
|
||||
@ -146,7 +146,7 @@ template<unsigned length> string ldecimal(uintmax_t value) {
|
||||
result[x] = buffer[y];
|
||||
}
|
||||
|
||||
return result;
|
||||
return &result[0];
|
||||
}
|
||||
|
||||
template<unsigned length> string rdecimal(uintmax_t value) {
|
||||
@ -168,7 +168,7 @@ template<unsigned length> string rdecimal(uintmax_t value) {
|
||||
result[x] = buffer[y];
|
||||
}
|
||||
|
||||
return result;
|
||||
return &result[0];
|
||||
}
|
||||
|
||||
template<unsigned length> string hex(uintmax_t value) {
|
||||
@ -192,7 +192,7 @@ template<unsigned length> string hex(uintmax_t value) {
|
||||
output[offset - i] = temp;
|
||||
}
|
||||
|
||||
return output;
|
||||
return &output[0];
|
||||
}
|
||||
|
||||
template<unsigned length> string binary(uintmax_t value) {
|
||||
@ -214,7 +214,7 @@ template<unsigned length> string binary(uintmax_t value) {
|
||||
output[offset - i] = temp;
|
||||
}
|
||||
|
||||
return output;
|
||||
return &output[0];
|
||||
}
|
||||
|
||||
//using sprintf is certainly not the most ideal method to convert
|
||||
|
@ -32,6 +32,8 @@ void BSXCartridge::reset() {
|
||||
uint8 BSXCartridge::memory_access(bool write, Memory &memory, unsigned addr, uint8 data) {
|
||||
if(write == 0) return memory_read(memory, addr);
|
||||
memory_write(memory, addr, data);
|
||||
|
||||
return 0; // FIXME: Can it reach here?
|
||||
}
|
||||
|
||||
uint8 BSXCartridge::memory_read(Memory &memory, unsigned addr) {
|
||||
|
@ -36,6 +36,8 @@ uint8 SA1::bus_read(unsigned addr) {
|
||||
synchronize_cpu();
|
||||
return bitmap_read(addr & 0x0fffff);
|
||||
}
|
||||
|
||||
return 0; // FIXME: Can it reach here?
|
||||
}
|
||||
|
||||
void SA1::bus_write(unsigned addr, uint8 data) {
|
||||
@ -96,6 +98,8 @@ uint8 SA1::vbr_read(unsigned addr) {
|
||||
if((addr & 0x40f800) == 0x003000) { //$00-3f|80-bf:3000-37ff
|
||||
return iram.read(addr & 0x2047);
|
||||
}
|
||||
|
||||
return 0; // FIXME: Can it reach here?
|
||||
}
|
||||
|
||||
//ROM, I-RAM and MMIO registers are accessed at ~10.74MHz (2 clock ticks)
|
||||
|
@ -24,6 +24,8 @@ uint8 SuperFX::bus_read(unsigned addr) {
|
||||
}
|
||||
return cartridge.ram.read(addr & ram_mask);
|
||||
}
|
||||
|
||||
return 0; // FIXME: Can it reach here?
|
||||
}
|
||||
|
||||
void SuperFX::bus_write(unsigned addr, uint8 data) {
|
||||
|
@ -214,6 +214,9 @@ uint8 Input::port_read(bool portnumber) {
|
||||
case 30: return 0;
|
||||
case 31: return 0;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
} //case Device::Justifier(s)
|
||||
} //switch(p.device.i)
|
||||
|
||||
@ -263,6 +266,8 @@ void Input::update() {
|
||||
latchy = (p.device.i == Device::Justifiers ? p.justifier.y2 : -1);
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(latchy < 0 || latchy >= (ppu.overscan() ? 240 : 225) || latchx < 0 || latchx >= 256) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user