(svn r7714) - Cleanup: 'replace' artifacts comments in comments custombridgeheads
authorKUDr
Mon, 01 Jan 2007 10:26:12 +0000
branchcustombridgeheads
changeset 5620 3b40a41f90d2
parent 5619 a2f1d08e2215
child 5621 6ce400c0a2f4
(svn r7714) - Cleanup: 'replace' artifacts comments in comments
yapf/blob.hpp
--- a/yapf/blob.hpp	Mon Jan 01 01:43:40 2007 +0000
+++ b/yapf/blob.hpp	Mon Jan 01 10:26:12 2007 +0000
@@ -25,20 +25,20 @@
 *    - no thread synchronization at all
 *
 *  Internal member layout:
-*  1. The only class member is posize_ter to the first item (see union ptr_u).
+*  1. The only class member is pointer to the first item (see union ptr_u).
 *  2. Allocated block contains the blob header (see CHdr) followed by the raw byte data.
 *     Always, when it allocates memory the allocated size is:
 *                                                      sizeof(CHdr) + <data capacity>
 *  3. Two 'virtual' members (m_size and m_max_size) are stored in the CHdr at beginning
 *     of the alloated block.
-*  4. The posize_ter (in ptr_u) posize_ts behind the header (to the first data byte).
+*  4. The pointter (in ptr_u) posize_ts behind the header (to the first data byte).
 *     When memory block is allocated, the sizeof(CHdr) it added to it.
 *  5. Benefits of this layout:
-*     - items are accessed in the simplest possible way - just dereferencing the posize_ter,
+*     - items are accessed in the simplest possible way - just dereferencing the pointer,
 *       which is good for performance (assuming that data are accessed most often).
-*     - sizeof(blob) is the same as the size of any other posize_ter
+*     - sizeof(blob) is the same as the size of any other pointer
 *  6. Drawbacks of this layout:
-*     - the fact, that posize_ter to the alocated block is adjusted by sizeof(CHdr) before
+*     - the fact, that pointer to the alocated block is adjusted by sizeof(CHdr) before
 *       it is stored can lead to several confusions:
 *         - it is not common pattern so the implementation code is bit harder to read
 *         - valgrind can generate warning that allocated block is lost (not accessible)
@@ -78,14 +78,14 @@
 	/** destructor */
 	FORCEINLINE ~CBlobBaseSimple() { Free(); }
 protected:
-	/** initialize the empty blob by setting the ptr_u.m_pHdr_1 posize_ter to the static CHdr with
+	/** initialize the empty blob by setting the ptr_u.m_pHdr_1 pointer to the static CHdr with
 	*  both m_size and m_max_size containing zero */
 	FORCEINLINE void InitEmpty() { static CHdr hdrEmpty[] = {{0, 0}, {0, 0}}; ptr_u.m_pHdr_1 = &hdrEmpty[1]; }
 	/** initialize blob by attaching it to the given header followed by data */
 	FORCEINLINE void Init(CHdr* hdr) { ptr_u.m_pHdr_1 = &hdr[1]; }
-	/** blob header accessor - use it rather than using the posize_ter arithmetics directly - non-const version */
+	/** blob header accessor - use it rather than using the pointer arithmetics directly - non-const version */
 	FORCEINLINE CHdr& Hdr() { return ptr_u.m_pHdr_1[-1]; }
-	/** blob header accessor - use it rather than using the posize_ter arithmetics directly - const version */
+	/** blob header accessor - use it rather than using the pointer arithmetics directly - const version */
 	FORCEINLINE const CHdr& Hdr() const { return ptr_u.m_pHdr_1[-1]; }
 	/** return reference to the actual blob size - used when the size needs to be modified */
 	FORCEINLINE size_t& RawSizeRef() { return Hdr().m_size; };
@@ -97,9 +97,9 @@
 	FORCEINLINE size_t RawSize() const { return Hdr().m_size; };
 	/** return the current blob capacity in bytes */
 	FORCEINLINE size_t MaxRawSize() const { return Hdr().m_max_size; };
-	/** return posize_ter to the first byte of data - non-const version */
+	/** return pointer to the first byte of data - non-const version */
 	FORCEINLINE int8* RawData() { return ptr_u.m_pData; }
-	/** return posize_ter to the first byte of data - const version */
+	/** return pointer to the first byte of data - const version */
 	FORCEINLINE const int8* RawData() const { return ptr_u.m_pData; }
 #if 0 // reenable when needed
 	/** return the 32 bit CRC of valid data in the blob */
@@ -135,7 +135,7 @@
 	}
 
 	/** Reallocate if there is no free space for num_bytes bytes.
-	*  @return posize_ter to the new data to be added */
+	*  @return pointer to the new data to be added */
 	FORCEINLINE int8* MakeRawFreeSpace(size_t num_bytes)
 	{
 		assert(num_bytes >= 0);
@@ -145,7 +145,7 @@
 	}
 
 	/** Increase RawSize() by num_bytes.
-	*  @return posize_ter to the new data added */
+	*  @return pointer to the new data added */
 	FORCEINLINE int8* GrowRawSize(size_t num_bytes)
 	{
 		int8* pNewData = MakeRawFreeSpace(num_bytes);
@@ -254,13 +254,13 @@
 	FORCEINLINE ~CBlobT() { Free(); }
 	/** Check the validity of item index (only in debug mode) */
 	FORCEINLINE void CheckIdx(size_t idx) { assert(idx >= 0); assert(idx < Size()); }
-	/** Return posize_ter to the first data item - non-const version */
+	/** Return pointer to the first data item - non-const version */
 	FORCEINLINE Titem* Data() { return (Titem*)Tbase::RawData(); }
-	/** Return posize_ter to the first data item - const version */
+	/** Return pointer to the first data item - const version */
 	FORCEINLINE const Titem* Data() const { return (const Titem*)Tbase::RawData(); }
-	/** Return posize_ter to the idx-th data item - non-const version */
+	/** Return pointer to the idx-th data item - non-const version */
 	FORCEINLINE Titem* Data(size_t idx) { CheckIdx(idx); return (Data() + idx); }
-	/** Return posize_ter to the idx-th data item - const version */
+	/** Return pointer to the idx-th data item - const version */
 	FORCEINLINE const Titem* Data(size_t idx) const { CheckIdx(idx); return (Data() + idx); }
 	/** Return number of items in the Blob */
 	FORCEINLINE size_t Size() const { return (Tbase::RawSize() / Titem_size); }
@@ -332,7 +332,7 @@
 		Titem* pRemoved = Data(idx);
 		RemoveBySwap(pRemoved);
 	}
-	/** Remove item given by posize_ter replacing it by the last item and reducing the size by one */
+	/** Remove item given by pointer replacing it by the last item and reducing the size by one */
 	FORCEINLINE void RemoveBySwap(Titem* pItem)
 	{
 		Titem* pLast = Data(Size() - 1);
@@ -347,7 +347,7 @@
 		// and reduce the raw blob size
 		Tbase::ReduceRawSize(Titem_size);
 	}
-	/** Ensures that given number of items can be added to the end of Blob. Returns posize_ter to the
+	/** Ensures that given number of items can be added to the end of Blob. Returns pointer to the
 	*  first free (unused) item */
 	FORCEINLINE Titem* MakeFreeSpace(size_t num_items) { return (Titem*)Tbase::MakeRawFreeSpace(num_items * Titem_size); }