1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

Make clang happy

This commit is contained in:
kd-11 2024-02-25 18:03:32 +03:00 committed by kd-11
parent f748fe688c
commit 83256cdacb
2 changed files with 7 additions and 6 deletions

View File

@ -17,10 +17,10 @@ namespace rsx
private: private:
static constexpr u32 _local_capacity = std::max<u32>(64u / sizeof(Ty), 1u); static constexpr u32 _local_capacity = std::max<u32>(64u / sizeof(Ty), 1u);
Ty _local_storage[_local_capacity]; char _local_storage[_local_capacity * sizeof(Ty)];
u32 _capacity = _local_capacity; u32 _capacity = _local_capacity;
Ty* _data = _local_capacity ? _local_storage : nullptr; Ty* _data = _local_capacity ? reinterpret_cast<Ty*>(_local_storage) : nullptr;
u32 _size = 0; u32 _size = 0;
inline u64 offset(const_iterator pos) inline u64 offset(const_iterator pos)
@ -30,7 +30,7 @@ namespace rsx
bool is_local_storage() const bool is_local_storage() const
{ {
return _data == _local_storage; return _data == reinterpret_cast<const Ty*>(_local_storage);
} }
public: public:
@ -157,9 +157,9 @@ namespace rsx
// Use memcpy to allow compiler optimizations // Use memcpy to allow compiler optimizations
Ty _stack_alloc[_local_capacity]; Ty _stack_alloc[_local_capacity];
std::memcpy(_stack_alloc, that._local_storage, that.size_bytes()); std::memcpy(_stack_alloc, that._data, that.size_bytes());
std::memcpy(that._local_storage, _local_storage, size_bytes()); std::memcpy(that._data, _data, size_bytes());
std::memcpy(_local_storage, _stack_alloc, that.size_bytes()); std::memcpy(_data, _stack_alloc, that.size_bytes());
std::swap(_size, that._size); std::swap(_size, that._size);
} }

View File

@ -316,6 +316,7 @@ void GLGSRender::flip(const rsx::display_flip_info_t& info)
case output_scaling_mode::bilinear: case output_scaling_mode::bilinear:
default: default:
m_upscaler = std::make_unique<gl::bilinear_upscale_pass>(); m_upscaler = std::make_unique<gl::bilinear_upscale_pass>();
break;
} }
} }