mirror of
https://github.com/PabloMK7/citra.git
synced 2025-12-18 21:28:46 +00:00
misc: fix issues pointed out by msvc (#7316)
* do not move constant variables
* applet_manager: avoid possible use after move
* use constant references where pointed out by msvc
* extra_hid: initialize response
* ValidateSaveState: passing slot separately is not necessary
* common: mark HashCombine as nodiscard
* cityhash: remove use of using namespace std
* Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
based on 7d8f115
* shared_memory.cpp: fix log error format
* fix compiling with pch off
This commit is contained in:
parent
6069fac76d
commit
c8c2beaeff
73 changed files with 181 additions and 167 deletions
|
|
@ -777,7 +777,7 @@ typename RasterizerCache<T>::SurfaceRect_Tuple RasterizerCache<T>::GetTexCopySur
|
|||
|
||||
template <class T>
|
||||
template <typename Func>
|
||||
void RasterizerCache<T>::ForEachSurfaceInRegion(PAddr addr, size_t size, Func&& func) {
|
||||
void RasterizerCache<T>::ForEachSurfaceInRegion(PAddr addr, std::size_t size, Func&& func) {
|
||||
using FuncReturn = typename std::invoke_result<Func, SurfaceId, Surface&>::type;
|
||||
static constexpr bool BOOL_BREAK = std::is_same_v<FuncReturn, bool>;
|
||||
boost::container::small_vector<SurfaceId, 8> surfaces;
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ public:
|
|||
private:
|
||||
/// Iterate over all page indices in a range
|
||||
template <typename Func>
|
||||
void ForEachPage(PAddr addr, size_t size, Func&& func) {
|
||||
void ForEachPage(PAddr addr, std::size_t size, Func&& func) {
|
||||
static constexpr bool RETURNS_BOOL = std::is_same_v<std::invoke_result<Func, u64>, bool>;
|
||||
const u64 page_end = (addr + size - 1) >> CITRA_PAGEBITS;
|
||||
for (u64 page = addr >> CITRA_PAGEBITS; page <= page_end; ++page) {
|
||||
|
|
@ -155,7 +155,7 @@ private:
|
|||
|
||||
/// Iterates over all the surfaces in a region calling func
|
||||
template <typename Func>
|
||||
void ForEachSurfaceInRegion(PAddr addr, size_t size, Func&& func);
|
||||
void ForEachSurfaceInRegion(PAddr addr, std::size_t size, Func&& func);
|
||||
|
||||
/// Get the best surface match (and its match type) for the given flags
|
||||
template <MatchFlags find_flags>
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public:
|
|||
/// Returns true if the surface contains a custom material with a normal map.
|
||||
bool HasNormalMap() const noexcept;
|
||||
|
||||
bool Overlaps(PAddr overlap_addr, size_t overlap_size) const noexcept {
|
||||
bool Overlaps(PAddr overlap_addr, std::size_t overlap_size) const noexcept {
|
||||
const PAddr overlap_end = overlap_addr + static_cast<PAddr>(overlap_size);
|
||||
return addr < overlap_end && overlap_addr < end;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue