Fixing some BOOL to bool and changing one function to void
parent
96e26e2ee4
commit
f6d86fcacf
|
|
@ -34,10 +34,10 @@
|
|||
#include "lltexteditor.h"
|
||||
#include "llstl.h"
|
||||
|
||||
inline BOOL LLKeywordToken::isHead(const llwchar* s) const
|
||||
inline bool LLKeywordToken::isHead(const llwchar* s) const
|
||||
{
|
||||
// strncmp is much faster than string compare
|
||||
BOOL res = TRUE;
|
||||
bool res = TRUE;
|
||||
const llwchar* t = mToken.c_str();
|
||||
S32 len = mToken.size();
|
||||
for (S32 i=0; i<len; i++)
|
||||
|
|
@ -51,9 +51,9 @@ inline BOOL LLKeywordToken::isHead(const llwchar* s) const
|
|||
return res;
|
||||
}
|
||||
|
||||
inline BOOL LLKeywordToken::isTail(const llwchar* s) const
|
||||
inline bool LLKeywordToken::isTail(const llwchar* s) const
|
||||
{
|
||||
BOOL res = TRUE;
|
||||
bool res = TRUE;
|
||||
const llwchar* t = mDelimiter.c_str();
|
||||
S32 len = mDelimiter.size();
|
||||
for (S32 i=0; i<len; i++)
|
||||
|
|
@ -67,7 +67,7 @@ inline BOOL LLKeywordToken::isTail(const llwchar* s) const
|
|||
return res;
|
||||
}
|
||||
|
||||
LLKeywords::LLKeywords() : mLoaded(FALSE) { }
|
||||
LLKeywords::LLKeywords() { }
|
||||
|
||||
LLKeywords::~LLKeywords()
|
||||
{
|
||||
|
|
@ -195,11 +195,10 @@ LLColor4 LLKeywords::getColorGroup(const std::string key_in)
|
|||
return LLUIColorTable::instance().getColor(ColourGroup);
|
||||
}
|
||||
|
||||
bool LLKeywords::initialise(LLSD SyntaxXML)
|
||||
void LLKeywords::initialise(LLSD SyntaxXML)
|
||||
{
|
||||
mSyntax = SyntaxXML;
|
||||
mLoaded = true;
|
||||
return mLoaded;
|
||||
mLoaded = TRUE;
|
||||
}
|
||||
|
||||
void LLKeywords::processTokens()
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ public:
|
|||
|
||||
S32 getLengthHead() const { return mToken.size(); }
|
||||
S32 getLengthTail() const { return mDelimiter.size(); }
|
||||
BOOL isHead(const llwchar* s) const;
|
||||
BOOL isTail(const llwchar* s) const;
|
||||
bool isHead(const llwchar* s) const;
|
||||
bool isTail(const llwchar* s) const;
|
||||
const LLWString& getToken() const { return mToken; }
|
||||
const LLColor4& getColor() const { return mColor; }
|
||||
TOKEN_TYPE getType() const { return mType; }
|
||||
|
|
@ -112,12 +112,10 @@ public:
|
|||
void addColorGroup(const std::string key_in, const LLColor4 color);
|
||||
void clearLoaded() { mLoaded = false; }
|
||||
LLColor4 getColorGroup(const std::string key_in);
|
||||
BOOL loadFromFile();
|
||||
BOOL loadFromFile(const std::string& filename);
|
||||
bool isLoaded() const { return mLoaded; }
|
||||
|
||||
void findSegments(std::vector<LLTextSegmentPtr> *seg_list, const LLWString& text, const LLColor4 &defaultColor, class LLTextEditor& editor );
|
||||
bool initialise(LLSD SyntaxXML);
|
||||
void initialise(LLSD SyntaxXML);
|
||||
void processTokens();
|
||||
|
||||
// Add the token as described
|
||||
|
|
|
|||
Loading…
Reference in New Issue