mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
simplify template code like std::invoke_result<T>::type
This commit is contained in:
parent
9e9a3262eb
commit
862727e9bf
@ -13,7 +13,7 @@ struct bf_base
|
||||
{
|
||||
using type = T;
|
||||
using vtype = std::common_type_t<type>;
|
||||
using utype = typename std::make_unsigned<vtype>::type;
|
||||
using utype = std::make_unsigned_t<vtype>;
|
||||
|
||||
static constexpr bool can_be_packed = N < (sizeof(int) * 8 + (std::is_unsigned_v<vtype> ? 1 : 0)) && sizeof(vtype) > sizeof(int);
|
||||
using compact_type = std::conditional_t<can_be_packed, std::conditional_t<std::is_unsigned_v<vtype>, uint, int>, vtype>;
|
||||
|
@ -410,7 +410,7 @@ namespace rsx
|
||||
std::sort(begin(), end(), predicate);
|
||||
}
|
||||
|
||||
template <typename F, typename U = std::invoke_result<F, const Ty&>::type>
|
||||
template <typename F, typename U = std::invoke_result_t<F, const Ty&>>
|
||||
requires std::is_invocable_v<F, const Ty&>
|
||||
simple_array<U> map(F&& xform) const
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ namespace rsx
|
||||
|
||||
rsx::address_range memory_range;
|
||||
|
||||
std::unique_ptr<typename std::remove_pointer<image_storage_type>::type> resolve_surface;
|
||||
std::unique_ptr<typename std::remove_pointer_t<image_storage_type>> resolve_surface;
|
||||
surface_sample_layout sample_layout = surface_sample_layout::null;
|
||||
surface_raster_type raster_type = surface_raster_type::linear;
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Emu/RSX/GL/GLTexture.h"
|
||||
#include "GLRenderTargets.h"
|
||||
#include "glutils/blitter.h"
|
||||
#include "glutils/sync.hpp"
|
||||
|
@ -1167,7 +1167,7 @@ template <typename T, usz Align = sizeof(T)>
|
||||
class atomic_t
|
||||
{
|
||||
protected:
|
||||
using type = typename std::remove_cv<T>::type;
|
||||
using type = std::remove_cv_t<T>;
|
||||
|
||||
using ptr_rt = std::conditional_t<std::is_pointer_v<type>, ullong, type>;
|
||||
|
||||
|
@ -148,7 +148,7 @@ namespace stx
|
||||
template <typename T, bool Swap, usz Align = alignof(T)>
|
||||
class alignas(Align) se_t
|
||||
{
|
||||
using type = typename std::remove_cv<T>::type;
|
||||
using type = std::remove_cv_t<T>;
|
||||
using stype = typename se_storage<type, Align>::type;
|
||||
using storage = se_storage<type, Align>;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user