mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
- fix compile on vs2017, change pow2char to static
- include nullptr check for mapname in music.cpp
This commit is contained in:
parent
7f3d00446d
commit
5002dd866c
2 changed files with 2 additions and 2 deletions
|
@ -1095,7 +1095,7 @@ CONSTEXPR size_t logbasenegative(T n)
|
||||||
static CONSTEXPR const char pow2char[8] = {1,2,4,8,16,32,64,128u};
|
static CONSTEXPR const char pow2char[8] = {1,2,4,8,16,32,64,128u};
|
||||||
#else
|
#else
|
||||||
// Revert the above to a real bit shift through some C++ operator magic. That saves me from reverting all the code that uses this construct.
|
// Revert the above to a real bit shift through some C++ operator magic. That saves me from reverting all the code that uses this construct.
|
||||||
struct
|
static struct
|
||||||
{
|
{
|
||||||
constexpr uint8_t operator[](int index) const { return 1 << index; };
|
constexpr uint8_t operator[](int index) const { return 1 << index; };
|
||||||
} pow2char;
|
} pow2char;
|
||||||
|
|
|
@ -566,7 +566,7 @@ int Mus_Play(const char *mapname, const char *fn, bool loop)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// A restart was requested. Ignore the music name being passed and just try tp restart what got here last.
|
// A restart was requested. Ignore the music name being passed and just try tp restart what got here last.
|
||||||
if (*mapname == '*')
|
if (mapname && *mapname == '*')
|
||||||
{
|
{
|
||||||
mapname = lastMusicLevel.GetChars();
|
mapname = lastMusicLevel.GetChars();
|
||||||
fn = lastMusic.GetChars();
|
fn = lastMusic.GetChars();
|
||||||
|
|
Loading…
Reference in a new issue