mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +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};
|
||||
#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.
|
||||
struct
|
||||
static struct
|
||||
{
|
||||
constexpr uint8_t operator[](int index) const { return 1 << index; };
|
||||
} pow2char;
|
||||
|
|
|
@ -566,7 +566,7 @@ int Mus_Play(const char *mapname, const char *fn, bool loop)
|
|||
return 0;
|
||||
}
|
||||
// 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();
|
||||
fn = lastMusic.GetChars();
|
||||
|
|
Loading…
Reference in a new issue