Fix compile errors on GCC

This commit is contained in:
Connor McLaughlin 2019-11-03 00:15:42 +10:00
parent 6dc7069d7c
commit 5abbdef065
6 changed files with 15 additions and 9 deletions

View file

@ -10,6 +10,8 @@ set(SRCS
cd_xa.h
gl_program.cpp
gl_program.h
gl_stream_buffer.cpp
gl_stream_buffer.h
gl_texture.cpp
gl_texture.h
jit_code_buffer.cpp

View file

@ -130,7 +130,7 @@ struct BitField
ALWAYS_INLINE void SetValue(DataType value)
{
data = (data & ~GetMask()) | (static_cast<BackingDataType>(value) << BitIndex) & GetMask();
data = (data & ~GetMask()) | ((static_cast<BackingDataType>(value) << BitIndex) & GetMask());
}
BackingDataType data;

View file

@ -78,7 +78,7 @@ public:
}
#define RELATIONAL_OPERATOR(op) \
bool operator##op(const Position& rhs) const \
bool operator op (const Position& rhs) const \
{ \
return std::tie(minute, second, frame) op std::tie(rhs.minute, rhs.second, rhs.frame); \
}

View file

@ -134,8 +134,8 @@ public:
}
}
template<u32 CAPACITY>
void PushFromQueue(FIFOQueue<T, CAPACITY>* other_queue)
template<u32 QUEUE_CAPACITY>
void PushFromQueue(FIFOQueue<T, QUEUE_CAPACITY>* other_queue)
{
while (!other_queue->IsEmpty() && !IsFull())
{

View file

@ -13,7 +13,7 @@ public:
using const_reference = const T&;
using pointer = T*;
using const_pointer = const T*;
using this_type = typename HeapArray<T, SIZE>;
using this_type = HeapArray<T, SIZE>;
HeapArray() { m_data = new T[size]; }
@ -71,7 +71,7 @@ public:
}
#define RELATIONAL_OPERATOR(op) \
bool operator##op(const this_type& rhs) const \
bool operator op (const this_type& rhs) const \
{ \
for (size_type i = 0; i < SIZE; i++) \
{ \

View file

@ -243,7 +243,11 @@ std::shared_ptr<MemoryCard> MemoryCard::Open(System* system, std::string_view fi
mc->m_filename = filename;
if (!mc->LoadFromFile())
{
Log_ErrorPrintf("Memory card at '%s' could not be read, formatting.");
SmallString message;
message.AppendString("Memory card at '");
message.AppendString(filename.data(), filename.length());
message.AppendString("' could not be read, formatting.");
Log_ErrorPrint(message);
mc->Format();
}