Browse Source
Merge pull request #4847 from ReinUsesLisp/warn-move
video_core: Enforce -Wredundant-move and -Wpessimizing-move
pull/15/merge
LC
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
5 additions and
4 deletions
-
src/video_core/CMakeLists.txt
-
src/video_core/command_classes/codecs/vp9.cpp
-
src/video_core/renderer_opengl/gl_shader_disk_cache.cpp
-
src/video_core/renderer_vulkan/wrapper.cpp
|
|
@ -302,6 +302,8 @@ else() |
|
|
target_compile_options(video_core PRIVATE |
|
|
target_compile_options(video_core PRIVATE |
|
|
-Werror=conversion |
|
|
-Werror=conversion |
|
|
-Wno-error=sign-conversion |
|
|
-Wno-error=sign-conversion |
|
|
|
|
|
-Werror=pessimizing-move |
|
|
|
|
|
-Werror=redundant-move |
|
|
-Werror=switch |
|
|
-Werror=switch |
|
|
-Werror=unused-variable |
|
|
-Werror=unused-variable |
|
|
|
|
|
|
|
|
|
|
|
@ -366,7 +366,7 @@ Vp9PictureInfo VP9::GetVp9PictureInfo(const NvdecCommon::NvdecRegisters& state) |
|
|
// to avoid buffering frame data needed for reference frame updating in the header composition.
|
|
|
// to avoid buffering frame data needed for reference frame updating in the header composition.
|
|
|
std::memcpy(vp9_info.frame_offsets.data(), state.surface_luma_offset.data(), 4 * sizeof(u64)); |
|
|
std::memcpy(vp9_info.frame_offsets.data(), state.surface_luma_offset.data(), 4 * sizeof(u64)); |
|
|
|
|
|
|
|
|
return std::move(vp9_info); |
|
|
|
|
|
|
|
|
return vp9_info; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void VP9::InsertEntropy(u64 offset, Vp9EntropyProbs& dst) { |
|
|
void VP9::InsertEntropy(u64 offset, Vp9EntropyProbs& dst) { |
|
|
|
|
|
@ -317,8 +317,7 @@ std::optional<std::vector<ShaderDiskCachePrecompiled>> ShaderDiskCacheOpenGL::Lo |
|
|
return std::nullopt; |
|
|
return std::nullopt; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return std::move(entries); |
|
|
|
|
|
|
|
|
return entries; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void ShaderDiskCacheOpenGL::InvalidateTransferable() { |
|
|
void ShaderDiskCacheOpenGL::InvalidateTransferable() { |
|
|
|
|
|
@ -844,7 +844,7 @@ std::optional<std::vector<VkExtensionProperties>> EnumerateInstanceExtensionProp |
|
|
VK_SUCCESS) { |
|
|
VK_SUCCESS) { |
|
|
return std::nullopt; |
|
|
return std::nullopt; |
|
|
} |
|
|
} |
|
|
return std::move(properties); |
|
|
|
|
|
|
|
|
return properties; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
std::optional<std::vector<VkLayerProperties>> EnumerateInstanceLayerProperties( |
|
|
std::optional<std::vector<VkLayerProperties>> EnumerateInstanceLayerProperties( |
|
|
|