aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/PositionCache.cxx
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/PositionCache.cxx
parent827c80b678ba55806c611de6163cafa7dcf03fb8 (diff)
downloadscintilla-mirror-81966e31f21a009cbae89dd3f774b3a410f201e4.tar.gz
Formatting whitespace.
Diffstat (limited to 'src/PositionCache.cxx')
-rw-r--r--src/PositionCache.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx
index 7bb0106fa..b2c2c2ede 100644
--- a/src/PositionCache.cxx
+++ b/src/PositionCache.cxx
@@ -361,7 +361,8 @@ void BreakFinder::Insert(int val) {
for (unsigned int j = 0; j<saeLen; j++) {
if (val == selAndEdge[j]) {
return;
- } if (val < selAndEdge[j]) {
+ }
+ if (val < selAndEdge[j]) {
for (unsigned int k = saeLen; k>j; k--) {
selAndEdge[k] = selAndEdge[k-1];
}
@@ -534,7 +535,7 @@ void PositionCacheEntry::Set(unsigned int styleNumber_, const char *s_,
clock = clock_;
if (s_ && positions_) {
positions = new short[len + (len + 1) / 2];
- for (unsigned int i=0;i<len;i++) {
+ for (unsigned int i=0; i<len; i++) {
positions[i] = static_cast<short>(positions_[i]);
}
memcpy(reinterpret_cast<char *>(positions + len), s_, len);
@@ -557,7 +558,7 @@ bool PositionCacheEntry::Retrieve(unsigned int styleNumber_, const char *s_,
unsigned int len_, int *positions_) const {
if ((styleNumber == styleNumber_) && (len == len_) &&
(memcmp(reinterpret_cast<char *>(positions + len), s_, len)== 0)) {
- for (unsigned int i=0;i<len;i++) {
+ for (unsigned int i=0; i<len; i++) {
positions_[i] = positions[i];
}
return true;
@@ -603,7 +604,7 @@ PositionCache::~PositionCache() {
void PositionCache::Clear() {
if (!allClear) {
- for (size_t i=0;i<size;i++) {
+ for (size_t i=0; i<size; i++) {
pces[i].Clear();
}
}
@@ -647,7 +648,7 @@ void PositionCache::MeasureWidths(Surface *surface, ViewStyle &vstyle, unsigned
if (clock > 60000) {
// Since there are only 16 bits for the clock, wrap it round and
// reset all cache entries so none get stuck with a high clock.
- for (size_t i=0;i<size;i++) {
+ for (size_t i=0; i<size; i++) {
pces[i].ResetClock();
}
clock = 2;