aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/SVector.h
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-02-17 00:39:46 +0000
committernyamatongwe <devnull@localhost>2010-02-17 00:39:46 +0000
commit81966e31f21a009cbae89dd3f774b3a410f201e4 (patch)
treefddf110012583bb00001b22648b574320f642815 /src/SVector.h
parent827c80b678ba55806c611de6163cafa7dcf03fb8 (diff)
downloadscintilla-mirror-81966e31f21a009cbae89dd3f774b3a410f201e4.tar.gz
Formatting whitespace.
Diffstat (limited to 'src/SVector.h')
-rw-r--r--src/SVector.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/SVector.h b/src/SVector.h
index 7b929190d..12a7d5d40 100644
--- a/src/SVector.h
+++ b/src/SVector.h
@@ -19,19 +19,19 @@ namespace Scintilla {
*/
class SVector {
enum { allocSize = 4000 };
-
+
int *v; ///< The vector
unsigned int size; ///< Number of elements allocated
unsigned int len; ///< Number of elements used in vector
-
+
/** Internally allocate more elements than the user wants
* to avoid thrashing the memory allocator. */
void SizeTo(int newSize) {
if (newSize < allocSize)
newSize += allocSize;
- else
+ else
newSize = (newSize * 3) / 2;
- int* newv = new int[newSize];
+ int *newv = new int[newSize];
size = newSize;
unsigned int i=0;
for (; i<len; i++) {
@@ -43,7 +43,7 @@ class SVector {
delete []v;
v = newv;
}
-
+
public:
SVector() {
v = 0;
@@ -60,7 +60,7 @@ public:
size = 0;
if (other.Length() > 0) {
SizeTo(other.Length());
- for (int i=0;i<other.Length();i++)
+ for (int i=0; i<other.Length(); i++)
v[i] = other.v[i];
len = other.Length();
}
@@ -74,7 +74,7 @@ public:
size = 0;
if (other.Length() > 0) {
SizeTo(other.Length());
- for (int i=0;i<other.Length();i++)
+ for (int i=0; i<other.Length(); i++)
v[i] = other.v[i];
len = other.Length();
}