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:
@@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/vector_math.h"
|
||||
#include "video_core/pica_types.h"
|
||||
|
||||
|
||||
@@ -398,7 +398,7 @@ void PicaCore::SubmitImmediate(u32 value) {
|
||||
return;
|
||||
}
|
||||
|
||||
constexpr size_t IMMEDIATE_MODE_INDEX = 0xF;
|
||||
constexpr std::size_t IMMEDIATE_MODE_INDEX = 0xF;
|
||||
|
||||
auto& setup = regs.internal.pipeline.vs_default_attributes_setup;
|
||||
if (setup.index > IMMEDIATE_MODE_INDEX) {
|
||||
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
|
||||
public:
|
||||
union Regs {
|
||||
static constexpr size_t NUM_REGS = 0x732;
|
||||
static constexpr std::size_t NUM_REGS = 0x732;
|
||||
|
||||
struct {
|
||||
u32 hardware_id;
|
||||
|
||||
@@ -4,7 +4,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include <string>
|
||||
#include "common/assert.h"
|
||||
#include "common/bit_field.h"
|
||||
#include "common/common_funcs.h"
|
||||
|
||||
namespace Pica {
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include "common/assert.h"
|
||||
#include "common/bit_field.h"
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/math_util.h"
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/bit_set.h"
|
||||
#include "common/hash.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "video_core/pica/regs_shader.h"
|
||||
#include "video_core/pica/shader_setup.h"
|
||||
|
||||
|
||||
@@ -21,15 +21,15 @@ struct Uniforms {
|
||||
std::array<bool, 16> b;
|
||||
std::array<Common::Vec4<u8>, 4> i;
|
||||
|
||||
static size_t GetFloatUniformOffset(u32 index) {
|
||||
static std::size_t GetFloatUniformOffset(u32 index) {
|
||||
return offsetof(Uniforms, f) + index * sizeof(Common::Vec4<f24>);
|
||||
}
|
||||
|
||||
static size_t GetBoolUniformOffset(u32 index) {
|
||||
static std::size_t GetBoolUniformOffset(u32 index) {
|
||||
return offsetof(Uniforms, b) + index * sizeof(bool);
|
||||
}
|
||||
|
||||
static size_t GetIntUniformOffset(u32 index) {
|
||||
static std::size_t GetIntUniformOffset(u32 index) {
|
||||
return offsetof(Uniforms, i) + index * sizeof(Common::Vec4<u8>);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/assert.h"
|
||||
#include "common/bit_set.h"
|
||||
#include "video_core/pica/regs_shader.h"
|
||||
#include "video_core/pica/shader_unit.h"
|
||||
|
||||
@@ -33,15 +33,15 @@ struct ShaderUnit {
|
||||
|
||||
void WriteOutput(const ShaderRegs& config, AttributeBuffer& output);
|
||||
|
||||
static constexpr size_t InputOffset(s32 register_index) {
|
||||
static constexpr std::size_t InputOffset(s32 register_index) {
|
||||
return offsetof(ShaderUnit, input) + register_index * sizeof(Common::Vec4<f24>);
|
||||
}
|
||||
|
||||
static constexpr size_t OutputOffset(s32 register_index) {
|
||||
static constexpr std::size_t OutputOffset(s32 register_index) {
|
||||
return offsetof(ShaderUnit, output) + register_index * sizeof(Common::Vec4<f24>);
|
||||
}
|
||||
|
||||
static constexpr size_t TemporaryOffset(s32 register_index) {
|
||||
static constexpr std::size_t TemporaryOffset(s32 register_index) {
|
||||
return offsetof(ShaderUnit, temporary) + register_index * sizeof(Common::Vec4<f24>);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user