From 63c2e32e207d31ecadd9022e1d7cd705c9febac8 Mon Sep 17 00:00:00 2001 From: fearlessTobi Date: Sat, 15 Sep 2018 15:21:06 +0200 Subject: Port #4182 from Citra: "Prefix all size_t with std::" --- .../renderer_opengl/gl_rasterizer_cache.h | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'src/video_core/renderer_opengl/gl_rasterizer_cache.h') diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 57ea8593b..aafac9a20 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h @@ -90,7 +90,7 @@ struct SurfaceParams { Invalid = 255, }; - static constexpr size_t MaxPixelFormat = static_cast(PixelFormat::Max); + static constexpr std::size_t MaxPixelFormat = static_cast(PixelFormat::Max); enum class ComponentType { Invalid = 0, @@ -199,8 +199,8 @@ struct SurfaceParams { 1, // Z32FS8 }}; - ASSERT(static_cast(format) < compression_factor_table.size()); - return compression_factor_table[static_cast(format)]; + ASSERT(static_cast(format) < compression_factor_table.size()); + return compression_factor_table[static_cast(format)]; } static constexpr u32 GetFormatBpp(PixelFormat format) { @@ -260,8 +260,8 @@ struct SurfaceParams { 64, // Z32FS8 }}; - ASSERT(static_cast(format) < bpp_table.size()); - return bpp_table[static_cast(format)]; + ASSERT(static_cast(format) < bpp_table.size()); + return bpp_table[static_cast(format)]; } u32 GetFormatBpp() const { @@ -636,16 +636,18 @@ struct SurfaceParams { } static SurfaceType GetFormatType(PixelFormat pixel_format) { - if (static_cast(pixel_format) < static_cast(PixelFormat::MaxColorFormat)) { + if (static_cast(pixel_format) < + static_cast(PixelFormat::MaxColorFormat)) { return SurfaceType::ColorTexture; } - if (static_cast(pixel_format) < static_cast(PixelFormat::MaxDepthFormat)) { + if (static_cast(pixel_format) < + static_cast(PixelFormat::MaxDepthFormat)) { return SurfaceType::Depth; } - if (static_cast(pixel_format) < - static_cast(PixelFormat::MaxDepthStencilFormat)) { + if (static_cast(pixel_format) < + static_cast(PixelFormat::MaxDepthStencilFormat)) { return SurfaceType::DepthStencil; } @@ -659,7 +661,7 @@ struct SurfaceParams { MathUtil::Rectangle GetRect() const; /// Returns the size of this surface in bytes, adjusted for compression - size_t SizeInBytes() const { + std::size_t SizeInBytes() const { const u32 compression_factor{GetCompressionFactor(pixel_format)}; ASSERT(width % compression_factor == 0); ASSERT(height % compression_factor == 0); @@ -671,7 +673,7 @@ struct SurfaceParams { static SurfaceParams CreateForTexture(const Tegra::Texture::FullTextureInfo& config); /// Creates SurfaceParams from a framebuffer configuration - static SurfaceParams CreateForFramebuffer(size_t index); + static SurfaceParams CreateForFramebuffer(std::size_t index); /// Creates SurfaceParams for a depth buffer configuration static SurfaceParams CreateForDepthBuffer(u32 zeta_width, u32 zeta_height, @@ -694,7 +696,7 @@ struct SurfaceParams { u32 height; u32 depth; u32 unaligned_height; - size_t size_in_bytes; + std::size_t size_in_bytes; SurfaceTarget target; }; @@ -711,7 +713,7 @@ struct SurfaceReserveKey : Common::HashableStruct { namespace std { template <> struct hash { - size_t operator()(const SurfaceReserveKey& k) const { + std::size_t operator()(const SurfaceReserveKey& k) const { return k.Hash(); } }; @@ -727,7 +729,7 @@ public: return params.addr; } - size_t GetSizeInBytes() const { + std::size_t GetSizeInBytes() const { return params.size_in_bytes; } @@ -775,7 +777,7 @@ public: Surface GetDepthBufferSurface(bool preserve_contents); /// Get the color surface based on the framebuffer configuration and the specified render target - Surface GetColorBufferSurface(size_t index, bool preserve_contents); + Surface GetColorBufferSurface(std::size_t index, bool preserve_contents); /// Flushes the surface to Switch memory void FlushSurface(const Surface& surface); -- cgit v1.2.3