diff options
Diffstat (limited to 'src/ExternalLexer.cxx')
-rw-r--r-- | src/ExternalLexer.cxx | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/ExternalLexer.cxx b/src/ExternalLexer.cxx index 098df4dd5..a0e58185c 100644 --- a/src/ExternalLexer.cxx +++ b/src/ExternalLexer.cxx @@ -40,7 +40,7 @@ char **WordListsToStrings(WordList *val[]) { while (val[dim]) dim++; char **wls = new char * [dim + 1]; - for (int i = 0;i < dim;i++) { + for (int i = 0; i < dim; i++) { std::string words; words = ""; for (int n = 0; n < val[i]->len; n++) { @@ -114,7 +114,7 @@ void ExternalLexerModule::SetExternal(ExtLexerFunction fLexer, ExtFoldFunction f // //------------------------------------------ -LexerLibrary::LexerLibrary(const char* ModuleName) { +LexerLibrary::LexerLibrary(const char *ModuleName) { // Initialise some members... first = NULL; last = NULL; @@ -195,15 +195,14 @@ void LexerLibrary::Release() { /// Return the single LexerManager instance... LexerManager *LexerManager::GetInstance() { - if(!theInstance) + if (!theInstance) theInstance = new LexerManager; return theInstance; } /// Delete any LexerManager instance... -void LexerManager::DeleteInstance() -{ - if(theInstance) { +void LexerManager::DeleteInstance() { + if (theInstance) { delete theInstance; theInstance = NULL; } @@ -219,13 +218,11 @@ LexerManager::~LexerManager() { Clear(); } -void LexerManager::Load(const char* path) -{ +void LexerManager::Load(const char *path) { LoadLexerLibrary(path); } -void LexerManager::LoadLexerLibrary(const char* module) -{ +void LexerManager::LoadLexerLibrary(const char *module) { LexerLibrary *lib = new LexerLibrary(module); if (NULL != first) { last->next = lib; @@ -236,8 +233,7 @@ void LexerManager::LoadLexerLibrary(const char* module) } } -void LexerManager::Clear() -{ +void LexerManager::Clear() { if (NULL != first) { LexerLibrary *cur = first; LexerLibrary *next; @@ -257,8 +253,7 @@ void LexerManager::Clear() // //------------------------------------------ -LMMinder::~LMMinder() -{ +LMMinder::~LMMinder() { LexerManager::DeleteInstance(); } |