Reactor/Traits: Swap the naming of CToReactorPtr and CToReactorPtrT.
This should have been done as part of 51f08312, but it got missed.
Bug: b/143479561
Change-Id: I16d802e753989576ade007c031f11bc5ab351d32
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38390
Tested-by: Ben Clayton <bclayton@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
diff --git a/src/Reactor/Traits.hpp b/src/Reactor/Traits.hpp
index a33626b..722b9a4 100644
--- a/src/Reactor/Traits.hpp
+++ b/src/Reactor/Traits.hpp
@@ -81,28 +81,28 @@
// TODO: Long has no constructor that takes a uint64_t
template<> struct CToReactor<uint64_t> { using type = Long; /* static Long cast(uint64_t); */ };
- // CToReactorPtrT<T>::type resolves to the corresponding Reactor Pointer<>
+ // CToReactorPtr<T>::type resolves to the corresponding Reactor Pointer<>
// type for T*.
// For T types that have a CToReactorT<> specialization,
- // CToReactorPtrT<T>::type resolves to Pointer< CToReactorT<T> >, otherwise
- // CToReactorPtrT<T>::type resolves to Pointer<Byte>.
- template<typename T, typename ENABLE = void> struct CToReactorPtrT
+ // CToReactorPtr<T>::type resolves to Pointer< CToReactorT<T> >, otherwise
+ // CToReactorPtr<T>::type resolves to Pointer<Byte>.
+ template<typename T, typename ENABLE = void> struct CToReactorPtr
{
using type = Pointer<Byte>;
static inline type cast(const T* v); // implemented in Traits.inl
};
- // CToReactorPtrT specialization for T types that have a CToReactorT<>
+ // CToReactorPtr specialization for T types that have a CToReactorT<>
// specialization.
- template<typename T> struct CToReactorPtrT<T, typename std::enable_if< IsDefined< CToReactorT<T> >::value>::type >
+ template<typename T> struct CToReactorPtr<T, typename std::enable_if< IsDefined< CToReactorT<T> >::value>::type >
{
using type = Pointer< CToReactorT<T> >;
static inline type cast(const T* v); // implemented in Traits.inl
};
- // CToReactorPtrT specialization for void*.
+ // CToReactorPtr specialization for void*.
// Maps to Pointer<Byte> instead of Pointer<Void>.
- template<> struct CToReactorPtrT<void, void>
+ template<> struct CToReactorPtr<void, void>
{
using type = Pointer<Byte>;
static inline type cast(const void* v); // implemented in Traits.inl
@@ -112,13 +112,13 @@
// Maps to Pointer<Byte>.
// Drops the 'const' qualifier from the cast() method to avoid warnings
// about const having no meaning for function types.
- template<typename T> struct CToReactorPtrT<T, typename std::enable_if< std::is_function<T>::value >::type >
+ template<typename T> struct CToReactorPtr<T, typename std::enable_if< std::is_function<T>::value >::type >
{
using type = Pointer<Byte>;
static inline type cast(T* v); // implemented in Traits.inl
};
- template<typename T> using CToReactorPtr = typename CToReactorPtrT<T>::type;
+ template<typename T> using CToReactorPtrT = typename CToReactorPtr<T>::type;
// CToReactor specialization for pointer types.
// For T types that have a CToReactorT<> specialization,
@@ -128,7 +128,7 @@
struct CToReactor<T, typename std::enable_if<std::is_pointer<T>::value>::type>
{
using elem = typename std::remove_pointer<T>::type;
- using type = CToReactorPtr<elem>;
+ using type = CToReactorPtrT<elem>;
static inline type cast(T v); // implemented in Traits.inl
};
diff --git a/src/Reactor/Traits.inl b/src/Reactor/Traits.inl
index 5cd46e3..fd40f5b 100644
--- a/src/Reactor/Traits.inl
+++ b/src/Reactor/Traits.inl
@@ -17,25 +17,25 @@
namespace rr
{
- // Non-specialized implementation of CToReactorPtrT::cast() defaults to
+ // Non-specialized implementation of CToReactorPtr::cast() defaults to
// returning a ConstantPointer for v.
template<typename T, typename ENABLE>
- Pointer<Byte> CToReactorPtrT<T, ENABLE>::cast(const T* v)
+ Pointer<Byte> CToReactorPtr<T, ENABLE>::cast(const T* v)
{
return ConstantPointer(v);
}
- // CToReactorPtrT specialization for T types that have a CToReactorT<>
+ // CToReactorPtr specialization for T types that have a CToReactorT<>
// specialization.
template<typename T>
Pointer<CToReactorT<T>>
- CToReactorPtrT<T, typename std::enable_if< IsDefined< CToReactorT<T> >::value>::type >::cast(const T* v)
+ CToReactorPtr<T, typename std::enable_if< IsDefined< CToReactorT<T> >::value>::type >::cast(const T* v)
{
return type(v);
}
- // CToReactorPtrT specialization for void*.
- Pointer<Byte> CToReactorPtrT<void, void>::cast(const void* v)
+ // CToReactorPtr specialization for void*.
+ Pointer<Byte> CToReactorPtr<void, void>::cast(const void* v)
{
return ConstantPointer(v);
}
@@ -43,17 +43,17 @@
// CToReactorPtrT specialization for function pointer types.
template<typename T>
Pointer<Byte>
- CToReactorPtrT<T, typename std::enable_if< std::is_function<T>::value >::type>::cast(T* v)
+ CToReactorPtr<T, typename std::enable_if< std::is_function<T>::value >::type>::cast(T* v)
{
return ConstantPointer(v);
}
// CToReactor specialization for pointer types.
template<typename T>
- CToReactorPtr<typename std::remove_pointer<T>::type>
+ CToReactorPtrT<typename std::remove_pointer<T>::type>
CToReactor<T, typename std::enable_if<std::is_pointer<T>::value>::type>::cast(T v)
{
- return CToReactorPtrT<elem>::cast(v);
+ return CToReactorPtr<elem>::cast(v);
}
// CToReactor specialization for enum types.