X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e14d10b039e68a701a447043a4031cf43e9fa90b..f4bb632cde9cc60fa89f173f0d33c5881794cc68:/src/stc/scintilla/include/PropSet.h diff --git a/src/stc/scintilla/include/PropSet.h b/src/stc/scintilla/include/PropSet.h index 1a7e2f1665..0b4c2f58de 100644 --- a/src/stc/scintilla/include/PropSet.h +++ b/src/stc/scintilla/include/PropSet.h @@ -24,11 +24,21 @@ struct Property { /** */ class PropSet { -private: +protected: enum { hashRoots=31 }; Property *props[hashRoots]; Property *enumnext; int enumhash; + static unsigned int HashString(const char *s, size_t len) { + unsigned int ret = 0; + while (len--) { + ret <<= 4; + ret ^= *s; + s++; + } + return ret; + } + static bool IncludesVar(const char *value, const char *key); public: PropSet *superPS; PropSet(); @@ -46,6 +56,11 @@ public: char *ToString(); // Caller must delete[] the return value bool GetFirst(char **key, char **val); bool GetNext(char **key, char **val); + +private: + // copy-value semantics not implemented + PropSet(const PropSet ©); + void operator=(const PropSet &assign); }; /** @@ -71,13 +86,20 @@ public: void SetFromAllocated(); bool InList(const char *s); const char *GetNearestWord(const char *wordStart, int searchLen = -1, - bool ignoreCase = false, SString wordCharacters=""); + bool ignoreCase = false, SString wordCharacters="", int wordIndex = -1); char *GetNearestWords(const char *wordStart, int searchLen=-1, - bool ignoreCase=false, char otherSeparator='\0'); + bool ignoreCase=false, char otherSeparator='\0', bool exactLen=false); }; inline bool IsAlphabetic(unsigned int ch) { return ((ch >= 'A') && (ch <= 'Z')) || ((ch >= 'a') && (ch <= 'z')); } + +#ifdef _MSC_VER +// Visual C++ doesn't like the private copy idiom for disabling +// the default copy constructor and operator=, but it's fine. +#pragma warning(disable: 4511 4512) +#endif + #endif