mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
28 lines
388 B
C++
28 lines
388 B
C++
#ifndef __TRACYALIGN_HPP__
|
|
#define __TRACYALIGN_HPP__
|
|
|
|
#include <string.h>
|
|
|
|
#include "TracyForceInline.hpp"
|
|
|
|
namespace tracy
|
|
{
|
|
|
|
template<typename T>
|
|
tracy_force_inline T MemRead( void* ptr )
|
|
{
|
|
T val;
|
|
memcpy( &val, ptr, sizeof( T ) );
|
|
return val;
|
|
}
|
|
|
|
template<typename T>
|
|
tracy_force_inline void MemWrite( void* ptr, T val )
|
|
{
|
|
memcpy( ptr, &val, sizeof( T ) );
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|