Skip to content
Snippets Groups Projects
Commit ec055f38 authored by Viktor Wolf's avatar Viktor Wolf
Browse files

next replace

parent f0a024f9
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
template <typename ParameterType, typename... RemainingParameterTypes> template <typename ParameterType, typename... RemainingParameterTypes>
inline void SerializeParameters(FMemoryWriter* MemoryWriter, ParameterType&& Parameter, RemainingParameterTypes&&... RemainingParameters) inline void SerializeParameters(FMemoryWriter* MemoryWriter, ParameterType&& Parameter, RemainingParameterTypes&&... RemainingParameters)
{ {
using NonConstType = typename std::remove_cv_t<typename TRemoveReference<ParameterType>::Type>::Type; using NonConstType = typename std::remove_cv_t<typename TRemoveReference<ParameterType>::Type>;
(*MemoryWriter) << const_cast<NonConstType&>(Parameter); // const_cast because the same operator (<<) is used for reading and writing (*MemoryWriter) << const_cast<NonConstType&>(Parameter); // const_cast because the same operator (<<) is used for reading and writing
SerializeParameters(MemoryWriter, Forward<RemainingParameterTypes>(RemainingParameters)...); SerializeParameters(MemoryWriter, Forward<RemainingParameterTypes>(RemainingParameters)...);
} }
......
...@@ -63,7 +63,7 @@ public: ...@@ -63,7 +63,7 @@ public:
// Create a tuple that holds all arguments. This assumes that all // Create a tuple that holds all arguments. This assumes that all
// argument types are default constructible. However, all // argument types are default constructible. However, all
// types that overload the FArchive "<<" operator probably are. // types that overload the FArchive "<<" operator probably are.
TTuple<typename std::remove_cv_t<typename TRemoveReference<ArgTypes>::Type>::Type...> ArgumentTuple; TTuple<typename std::remove_cv_t<typename TRemoveReference<ArgTypes>::Type>...> ArgumentTuple;
// This call will deserialze the values and fill all values in the tuple appropriately. // This call will deserialze the values and fill all values in the tuple appropriately.
FillArgumentTuple<0>(&MemoryReader, &ArgumentTuple); FillArgumentTuple<0>(&MemoryReader, &ArgumentTuple);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment