(svn r13227) -Codechange: Apply code style
authorpeter1138
Sat, 24 May 2008 10:02:49 +0000
changeset 9335 4f1e59a9aed4
parent 9334 28ac6c8e0795
child 9336 6baad5b3033d
(svn r13227) -Codechange: Apply code style
src/misc/smallvec.h
--- a/src/misc/smallvec.h	Sat May 24 02:54:47 2008 +0000
+++ b/src/misc/smallvec.h	Sat May 24 10:02:49 2008 +0000
@@ -1,11 +1,12 @@
 /* $Id$ */
 
-/** @file smallvec.h Simple vector class that allows allocating an item without the need to copy data needlessly. */
+/** @file smallvec.h Simple vector class that allows allocating an item without the need to copy this->data needlessly. */
 
 #ifndef SMALLVEC_H
 #define SMALLVEC_H
 
-template <typename T, uint S> struct SmallVector {
+template <typename T, uint S>
+struct SmallVector {
 	T *data;
 	uint items;
 	uint capacity;
@@ -14,7 +15,7 @@
 
 	~SmallVector()
 	{
-		free(data);
+		free(this->data);
 	}
 
 	/**
@@ -22,42 +23,42 @@
 	 */
 	T *Append()
 	{
-		if (items == capacity) {
-			capacity += S;
-			data = ReallocT(data, capacity);
+		if (this->items == this->capacity) {
+			this->capacity += S;
+			this->data = ReallocT(this->data, this->capacity);
 		}
 
-		return &data[items++];
+		return &this->data[this->items++];
 	}
 
 	const T *Begin() const
 	{
-		return data;
+		return this->data;
 	}
 
 	T *Begin()
 	{
-		return data;
+		return this->data;
 	}
 
 	const T *End() const
 	{
-		return &data[items];
+		return &this->data[this->items];
 	}
 
 	T *End()
 	{
-		return &data[items];
+		return &this->data[this->items];
 	}
 
-	const T *Get(size_t index) const
+	const T *Get(uint index) const
 	{
-		return &data[index];
+		return &this->data[index];
 	}
 
-	T *Get(size_t index)
+	T *Get(uint index)
 	{
-		return &data[index];
+		return &this->data[index];
 	}
 };