diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-29 18:45:16 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-29 18:45:16 -0500 |
| commit | c845d8a9e8b212308e729ffcd9ddf2e09884638e (patch) | |
| tree | 08e1eaaaf306e944885171f51e4ff6e644529e39 /src/video_core/engines/kepler_compute.h | |
| parent | 1a6785d296e01e5d4bed2101af62aa15f1f8c87f (diff) | |
| parent | 96ffc174aae2f2ac0662d770613ee7ed48e54c74 (diff) | |
Merge pull request #9352 from lioncash/vidcast
engines: Remove unnecessary casts
Diffstat (limited to 'src/video_core/engines/kepler_compute.h')
| -rw-r--r-- | src/video_core/engines/kepler_compute.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/video_core/engines/kepler_compute.h b/src/video_core/engines/kepler_compute.h index aab309ecc..e154e3f06 100644 --- a/src/video_core/engines/kepler_compute.h +++ b/src/video_core/engines/kepler_compute.h @@ -68,7 +68,7 @@ public: struct { u32 address; GPUVAddr Address() const { - return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address) << 8)); + return GPUVAddr{address} << 8; } } launch_desc_loc; @@ -83,8 +83,7 @@ public: u32 address_low; u32 limit; GPUVAddr Address() const { - return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) | - address_low); + return (GPUVAddr{address_high} << 32) | GPUVAddr{address_low}; } } tsc; @@ -95,8 +94,7 @@ public: u32 address_low; u32 limit; GPUVAddr Address() const { - return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) | - address_low); + return (GPUVAddr{address_high} << 32) | GPUVAddr{address_low}; } } tic; @@ -106,8 +104,7 @@ public: u32 address_high; u32 address_low; GPUVAddr Address() const { - return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high) << 32) | - address_low); + return (GPUVAddr{address_high} << 32) | GPUVAddr{address_low}; } } code_loc; @@ -162,8 +159,7 @@ public: BitField<15, 17, u32> size; }; GPUVAddr Address() const { - return static_cast<GPUVAddr>((static_cast<GPUVAddr>(address_high.Value()) << 32) | - address_low); + return (GPUVAddr{address_high.Value()} << 32) | GPUVAddr{address_low}; } }; std::array<ConstBufferConfig, NumConstBuffers> const_buffer_config; |
