mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Using push/pop in all pragma pack pair to avoid potential padding bugs
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
#pragma pack( 1 )
|
||||
#pragma pack( push, 1 )
|
||||
template<typename T>
|
||||
class Vector
|
||||
{
|
||||
@@ -348,7 +348,7 @@ private:
|
||||
template<typename T> struct VectorAdapterDirect { const T& operator()( const T& it ) const { return it; } };
|
||||
template<typename T> struct VectorAdapterPointer { const T& operator()( const short_ptr<T>& it ) const { return *it; } };
|
||||
|
||||
#pragma pack()
|
||||
#pragma pack( pop )
|
||||
|
||||
enum { VectorSize = sizeof( Vector<int> ) };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user