From 5408fdfade566474e8f6ab8abff989ad7ca90cc0 Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Sun, 8 Apr 2007 17:22:15 +0000 Subject: [PATCH] Remove couple of useless wrapper functions --- Src/Changes.txt | 2 ++ Src/MergeDoc.cpp | 20 ++++---------------- Src/MergeDoc.h | 2 -- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/Src/Changes.txt b/Src/Changes.txt index 8e536db4e..0c23f3f63 100644 --- a/Src/Changes.txt +++ b/Src/Changes.txt @@ -5,6 +5,8 @@ Add new items to top. 2007-04-08 Kimmo Add Jeremy Dewey and Dan Pidcock to contributors.txt Docs/Users: Contributors.txt + Remove couple of useless wrapper functions + Src: MergeDoc.cpp MergeDoc.h 2007-04-08 Takashi BUG: [ 1694581 ] Need to limit window tab width diff --git a/Src/MergeDoc.cpp b/Src/MergeDoc.cpp index 8ee8c6900..8b10a482e 100644 --- a/Src/MergeDoc.cpp +++ b/Src/MergeDoc.cpp @@ -3191,31 +3191,19 @@ void CMergeDoc::UpdateResources() GetRightView()->UpdateResources(); } -// Lookup named property and return as int -BOOL CMergeDoc::GetOptionInt(LPCTSTR name) const -{ - // Currently options are held by the main frame, in a subobject called m_options - return GetOptionsMgr()->GetInt(name); -} - -// Lookup named property and return as BOOL -BOOL CMergeDoc::GetOptionBool(LPCTSTR name) const -{ - // Currently options are held by the main frame, in a subobject called m_options - return GetOptionsMgr()->GetBool(name); -} - // Return current word breaking break type setting (whitespace only or include punctuation) bool CMergeDoc::GetBreakType() const { - return !!GetOptionInt(OPT_BREAK_TYPE); + BOOL breakType = GetOptionsMgr()->GetBool(OPT_BREAK_TYPE); + return !!breakType; } // Return true to do line diff colors at the byte level (false to do them at word level) bool CMergeDoc::GetByteColoringOption() const { // color at byte level if 'break_on_words' option not set - return !GetOptionBool(OPT_BREAK_ON_WORDS); + BOOL breakWords = GetOptionsMgr()->GetBool(OPT_BREAK_ON_WORDS); + return !breakWords; } /// Swap files and update views diff --git a/Src/MergeDoc.h b/Src/MergeDoc.h index ee2bd7a40..f78ade9ed 100644 --- a/Src/MergeDoc.h +++ b/Src/MergeDoc.h @@ -307,8 +307,6 @@ public: // implementation methods private: - BOOL GetOptionInt(LPCTSTR name) const; - BOOL GetOptionBool(LPCTSTR name) const; bool GetBreakType() const; bool GetByteColoringOption() const; bool IsValidCodepageForMergeEditor(unsigned cp) const; -- 2.11.0