yapf/blob.hpp
changeset 5081 fe3a6da19d9f
parent 4549 106ed18a7675
child 5082 d7719dfaa7e1
equal deleted inserted replaced
5080:2f268952e410 5081:fe3a6da19d9f
    30 		int8   *m_pData;
    30 		int8   *m_pData;
    31 		CHdr   *m_pHdr_1;
    31 		CHdr   *m_pHdr_1;
    32 	} ptr_u;
    32 	} ptr_u;
    33 
    33 
    34 public:
    34 public:
    35 	ST_CONST(int, Ttail_reserve = 4); // four extra bytes will be always allocated and zeroed at the end
    35 	ST_CONST(int, Ttail_reserve = 4) // four extra bytes will be always allocated and zeroed at the end
    36 
    36 
    37 	FORCEINLINE CBlobBaseSimple() { InitEmpty(); }
    37 	FORCEINLINE CBlobBaseSimple() { InitEmpty(); }
    38 	FORCEINLINE CBlobBaseSimple(const CBlobBaseSimple& src)
    38 	FORCEINLINE CBlobBaseSimple(const CBlobBaseSimple& src)
    39 	{
    39 	{
    40 		InitEmpty();
    40 		InitEmpty();
   167 	// make template arguments public:
   167 	// make template arguments public:
   168 public:
   168 public:
   169 	typedef Titem_ Titem;
   169 	typedef Titem_ Titem;
   170 	typedef Tbase_ Tbase;
   170 	typedef Tbase_ Tbase;
   171 
   171 
   172 	ST_CONST(int, Titem_size = sizeof(Titem));
   172 	ST_CONST(int, Titem_size = sizeof(Titem))
   173 
   173 
   174 	FORCEINLINE CBlobT() : Tbase() {}
   174 	FORCEINLINE CBlobT() : Tbase() {}
   175 	FORCEINLINE CBlobT(const Tbase& src) : Tbase(src) {assert((RawSize() % Titem_size) == 0);}
   175 	FORCEINLINE CBlobT(const Tbase& src) : Tbase(src) {assert((RawSize() % Titem_size) == 0);}
   176 	FORCEINLINE ~CBlobT() { Free(); }
   176 	FORCEINLINE ~CBlobT() { Free(); }
   177 	FORCEINLINE void CheckIdx(int idx) { assert(idx >= 0); assert(idx < Size()); }
   177 	FORCEINLINE void CheckIdx(int idx) { assert(idx >= 0); assert(idx < Size()); }