diff options
author | nyamatongwe <devnull@localhost> | 2011-07-11 11:17:48 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2011-07-11 11:17:48 +1000 |
commit | f6b5bf967bf310adb21269fc9b9c50801e7e4193 (patch) | |
tree | 1cd8a344b37005c4c9ebb983f6b8eec961069353 | |
parent | ae26c58db7902ce285311ff874890ad0da05e7fb (diff) | |
download | scintilla-mirror-f6b5bf967bf310adb21269fc9b9c50801e7e4193.tar.gz |
Avoid shadowing of fields even for static methods to stop warnings.
-rw-r--r-- | src/Document.cxx | 8 | ||||
-rw-r--r-- | src/Document.h | 2 | ||||
-rw-r--r-- | src/PositionCache.cxx | 8 | ||||
-rw-r--r-- | src/PositionCache.h | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index da07b6b73..8a825650a 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1112,17 +1112,17 @@ void Document::Indent(bool forwards, int lineBottom, int lineTop) { // Convert line endings for a piece of text to a particular mode. // Stop at len or when a NUL is found. // Caller must delete the returned pointer. -char *Document::TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolMode) { +char *Document::TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolModeWanted) { char *dest = new char[2 * len + 1]; const char *sptr = s; char *dptr = dest; for (size_t i = 0; (i < len) && (*sptr != '\0'); i++) { if (*sptr == '\n' || *sptr == '\r') { - if (eolMode == SC_EOL_CR) { + if (eolModeWanted == SC_EOL_CR) { *dptr++ = '\r'; - } else if (eolMode == SC_EOL_LF) { + } else if (eolModeWanted == SC_EOL_LF) { *dptr++ = '\n'; - } else { // eolMode == SC_EOL_CRLF + } else { // eolModeWanted == SC_EOL_CRLF *dptr++ = '\r'; *dptr++ = '\n'; } diff --git a/src/Document.h b/src/Document.h index e8dfbabc8..00d23a45d 100644 --- a/src/Document.h +++ b/src/Document.h @@ -303,7 +303,7 @@ public: int GetColumn(int position); int FindColumn(int line, int column); void Indent(bool forwards, int lineBottom, int lineTop); - static char *TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolMode); + static char *TransformLineEnds(int *pLenOut, const char *s, size_t len, int eolModeWanted); void ConvertLineEnds(int eolModeSet); void SetReadOnly(bool set) { cb.SetReadOnly(set); } bool IsReadOnly() { return cb.IsReadOnly(); } diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 8a195caac..2105c292f 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -542,16 +542,16 @@ bool PositionCacheEntry::Retrieve(unsigned int styleNumber_, const char *s_, } } -int PositionCacheEntry::Hash(unsigned int styleNumber, const char *s, unsigned int len) { +int PositionCacheEntry::Hash(unsigned int styleNumber_, const char *s, unsigned int len_) { unsigned int ret = s[0] << 7; - for (unsigned int i=0; i<len; i++) { + for (unsigned int i=0; i<len_; i++) { ret *= 1000003; ret ^= s[i]; } ret *= 1000003; - ret ^= len; + ret ^= len_; ret *= 1000003; - ret ^= styleNumber; + ret ^= styleNumber_; return ret; } diff --git a/src/PositionCache.h b/src/PositionCache.h index 6abec6e7e..c6076ea20 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -110,7 +110,7 @@ public: void Set(unsigned int styleNumber_, const char *s_, unsigned int len_, int *positions_, unsigned int clock); void Clear(); bool Retrieve(unsigned int styleNumber_, const char *s_, unsigned int len_, int *positions_) const; - static int Hash(unsigned int styleNumber, const char *s, unsigned int len); + static int Hash(unsigned int styleNumber_, const char *s, unsigned int len); bool NewerThan(const PositionCacheEntry &other) const; void ResetClock(); }; |