OSDN Git Service

Reduce the size of the executable file (3)
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Thu, 4 Jul 2019 23:17:55 +0000 (08:17 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Thu, 4 Jul 2019 23:17:55 +0000 (08:17 +0900)
61 files changed:
Src/Common/OptionsMgr.cpp
Src/Common/OptionsMgr.h
Src/Common/ShellFileOperations.cpp
Src/Common/ShellFileOperations.h
Src/Common/UniFile.cpp
Src/Common/UniFile.h
Src/Common/VersionInfo.cpp
Src/Common/VersionInfo.h
Src/CompareStats.cpp
Src/CompareStats.h
Src/ConfigLog.cpp
Src/ConfigLog.h
Src/DiffFileInfo.cpp
Src/DiffFileInfo.h
Src/DiffList.cpp
Src/DiffList.h
Src/DiffTextBuffer.cpp
Src/DiffTextBuffer.h
Src/DiffThread.cpp
Src/DiffThread.h
Src/DiffWrapper.cpp
Src/DiffWrapper.h
Src/DirCompProgressBar.cpp
Src/DirCompProgressBar.h
Src/DirDoc.cpp
Src/DirDoc.h
Src/DirFrame.cpp
Src/DirFrame.h
Src/DirScan.cpp
Src/EditorFilepathBar.cpp
Src/EditorFilepathBar.h
Src/FileActionScript.cpp
Src/FileActionScript.h
Src/FileFilterHelper.cpp
Src/FileFilterHelper.h
Src/FileFilterMgr.cpp
Src/FileFilterMgr.h
Src/FileVersion.cpp
Src/FileVersion.h
Src/FilepathEdit.cpp
Src/FilepathEdit.h
Src/FilterList.cpp
Src/FilterList.h
Src/HexMergeFrm.cpp
Src/HexMergeFrm.h
Src/LineFiltersList.cpp
Src/LineFiltersList.h
Src/LocationView.cpp
Src/LocationView.h
Src/Merge.cpp
Src/Merge.h
Src/MergeDoc.cpp
Src/MergeDoc.h
Src/MergeEditView.cpp
Src/MergeEditView.h
Src/PatchDlg.cpp
Src/PatchDlg.h
Src/PathContext.cpp
Src/PathContext.h
Src/ProjectFile.cpp
Src/ProjectFile.h

index 7f5e589..7341f97 100644 (file)
@@ -119,24 +119,6 @@ int COption::Init(const String& name, const varprop::VariantValue& defaultValue)
 }
 
 /**
- * @brief Return option value.
- * @return Value as Variant type.
- */
-const varprop::VariantValue& COption::Get() const
-{
-       return m_value;
-}
-
-/**
- * @brief Return option default value.
- * @return Default value as varian type.
- */
-const varprop::VariantValue& COption::GetDefault() const
-{
-       return m_valueDef;
-}
-
-/**
  * @brief Convert string to integer.
  * @param [in] str String to convert.
  * @param [out] val Converted integer.
index a499c48..53f0a3c 100644 (file)
@@ -73,6 +73,24 @@ private:
        varprop::VariantValue m_valueDef; /**< Option's default value. */
 };
 
+/**
+ * @brief Return option value.
+ * @return Value as Variant type.
+ */
+inline const varprop::VariantValue& COption::Get() const
+{
+       return m_value;
+}
+
+/**
+ * @brief Return option default value.
+ * @return Default value as varian type.
+ */
+inline const varprop::VariantValue& COption::GetDefault() const
+{
+       return m_valueDef;
+}
+
 typedef std::map<String, COption> OptionsMap;
 
 /**
index 145b41c..7446f64 100644 (file)
@@ -190,15 +190,6 @@ bool ShellFileOperations::Run()
 }
 
 /**
- * @brief Did the user cancel the operation?
- * @return true if the operation was canceled by the user.
- */
-bool ShellFileOperations::IsCanceled() const
-{
-       return m_isCanceled;
-}
-
-/**
  * @brief Reset the class.
  */
 void ShellFileOperations::Reset()
index c069d53..05fd78e 100644 (file)
@@ -57,3 +57,13 @@ private:
        bool m_bOneToOneMapping; /**< Same amount of sources and destinations? */
        bool m_isCanceled; /**< Did user cancel the operation? */
 };
+
+/**
+ * @brief Did the user cancel the operation?
+ * @return true if the operation was canceled by the user.
+ */
+inline bool ShellFileOperations::IsCanceled() const
+{
+       return m_isCanceled;
+}
+
index 84423b4..486aa79 100644 (file)
@@ -55,32 +55,6 @@ UniFile::UniError::UniError()
        ClearError();
 }
 
-/**
- * @brief Check if there is error.
- * @return true if there is an error.
- */
-bool UniFile::UniError::HasError() const
-{
-       return !desc.empty();
-}
-
-/**
- * @brief Clears the existing error.
- */
-void UniFile::UniError::ClearError()
-{
-       desc.erase();
-}
-
-/**
- * @brief Get the error string.
- * @return Error string.
- */
-String UniFile::UniError::GetError() const
-{
-       return desc;
-}
-
 /////////////
 // UniLocalFile
 /////////////
@@ -199,15 +173,6 @@ void UniMemFile::Close()
        }
 }
 
-/** @brief Is it currently attached to a file ? */
-bool UniMemFile::IsOpen() const
-{
-       // We don't test the handle here, because we allow "opening" empty file
-       // but memory-mapping doesn't work on that, so that uses a special state
-       // of no handle, but linenumber of 0
-       return m_lineno >= 0;
-}
-
 /** @brief Get file status into member variables */
 bool UniMemFile::GetFileStatus()
 {
@@ -355,24 +320,6 @@ bool UniMemFile::ReadBom()
 }
 
 /**
- * @brief Returns if file has a BOM bytes.
- * @return true if file has BOM bytes, false otherwise.
- */
-bool UniMemFile::HasBom() const
-{
-       return m_bom;
-}
-
-/**
- * @brief Sets if file has BOM or not.
- * @param [in] true to have a BOM in file, false to not to have.
- */
-void UniMemFile::SetBom(bool bom)
-{
-       m_bom = bom;
-}
-
-/**
  * @brief Read one (DOS or UNIX or Mac) line. Do not include eol chars.
  * @param [out] line Line read.
  * @param [out] lossy `true` if there were lossy encoding.
@@ -729,12 +676,6 @@ void UniStdioFile::Close()
        m_txtstats.clear();
 }
 
-/** @brief Is it currently attached to a file ? */
-bool UniStdioFile::IsOpen() const
-{
-       return m_fp != 0;
-}
-
 /** @brief Get file status into member variables */
 bool UniStdioFile::GetFileStatus()
 {
@@ -861,25 +802,6 @@ bool UniStdioFile::ReadBom()
        return unicode;
 }
 
-/**
- * @brief Returns if file has a BOM bytes.
- * @return true if file has BOM bytes, false otherwise.
- */
-bool UniStdioFile::HasBom() const
-{
-       return m_bom;
-}
-
-/**
- * @brief Sets if file has BOM or not.
- * @param [in] true to have a BOM in file, false to not to have.
- */
-void UniStdioFile::SetBom(bool bom)
-{
-       m_bom = bom;
-}
-
-
 bool UniStdioFile::ReadString(String & line, bool * lossy)
 {
        assert(false); // unimplemented -- currently cannot read from a UniStdioFile!
index 3b6318e..a049bf4 100644 (file)
@@ -71,6 +71,32 @@ public:
 };
 
 /**
+ * @brief Check if there is error.
+ * @return true if there is an error.
+ */
+inline bool UniFile::UniError::HasError() const
+{
+       return !desc.empty();
+}
+
+/**
+ * @brief Clears the existing error.
+ */
+inline void UniFile::UniError::ClearError()
+{
+       desc.erase();
+}
+
+/**
+ * @brief Get the error string.
+ * @return Error string.
+ */
+inline String UniFile::UniError::GetError() const
+{
+       return desc;
+}
+
+/**
  * @brief Local file access code used by both UniMemFile and UniStdioFile
  *
  * This class lacks an actual handle to a file
@@ -181,6 +207,33 @@ private:
        unsigned char *m_current; // current location in file
 };
 
+/** @brief Is it currently attached to a file ? */
+inline bool UniMemFile::IsOpen() const
+{
+       // We don't test the handle here, because we allow "opening" empty file
+       // but memory-mapping doesn't work on that, so that uses a special state
+       // of no handle, but linenumber of 0
+       return m_lineno >= 0;
+}
+
+/**
+ * @brief Returns if file has a BOM bytes.
+ * @return true if file has BOM bytes, false otherwise.
+ */
+inline bool UniMemFile::HasBom() const
+{
+       return m_bom;
+}
+
+/**
+ * @brief Sets if file has BOM or not.
+ * @param [in] true to have a BOM in file, false to not to have.
+ */
+inline void UniMemFile::SetBom(bool bom)
+{
+       m_bom = bom;
+}
+
 /**
  * @brief Regular buffered file (write-only access)
  * (ReadString methods have never been implemented,
@@ -227,3 +280,29 @@ private:
        int64_t m_data; // offset after any initial BOM
        ucr::buffer m_ucrbuff;
 };
+
+/** @brief Is it currently attached to a file ? */
+inline bool UniStdioFile::IsOpen() const
+{
+       return m_fp != 0;
+}
+
+/**
+ * @brief Returns if file has a BOM bytes.
+ * @return true if file has BOM bytes, false otherwise.
+ */
+inline bool UniStdioFile::HasBom() const
+{
+       return m_bom;
+}
+
+/**
+ * @brief Sets if file has BOM or not.
+ * @param [in] true to have a BOM in file, false to not to have.
+ */
+inline void UniStdioFile::SetBom(bool bom)
+{
+       m_bom = bom;
+}
+
+
index 80d9f8d..865dd2d 100644 (file)
@@ -106,96 +106,6 @@ CVersionInfo::CVersionInfo(HINSTANCE hModule)
 }
 
 /** 
- * @brief Return file version string.
- * @return File version as string.
- */
-String CVersionInfo::GetFileVersion() const
-{
-       return m_strFileVersion;
-}
-
-/** 
- * @brief Return private build value.
- * @return Private build number as string.
- */
-String CVersionInfo::GetPrivateBuild() const
-{
-       return m_strPrivateBuild;
-}
-
-/** 
- * @brief Return special build value.
- * @return Special build number as string.
- */
-String CVersionInfo::GetSpecialBuild() const
-{
-       return m_strSpecialBuild;
-}
-
-/** 
- * @brief Return company name.
- * @return Company name.
- */
-String CVersionInfo::GetCompanyName() const
-{
-       return m_strCompanyName;
-}
-
-/** 
- * @brief Return file description string.
- * @return File description string.
- */
-String CVersionInfo::GetFileDescription() const
-{
-       return m_strFileDescription;
-}
-
-/** 
- * @brief Return internal name.
- * @return Internal name.
- */
-String CVersionInfo::GetInternalName() const
-{
-       return m_strInternalName;
-}
-
-/** 
- * @brief Return full file name.
- * @return full file name.
- */
-String CVersionInfo::GetFullFileName() const
-{
-       return m_strFileName;
-}
-
-/** 
- * @brief Return copyright info.
- * @return Copyright info.
- */
-String CVersionInfo::GetLegalCopyright() const
-{
-       return m_strLegalCopyright;
-}
-
-/** 
- * @brief Return original filename.
- * @return Original filename.
- */
-String CVersionInfo::GetOriginalFilename() const
-{
-       return m_strOriginalFilename;
-}
-
-/** 
- * @brief Return product's version number.
- * @return Product's version number as string.
- */
-String CVersionInfo::GetProductVersion() const
-{
-       return m_strProductVersion;
-}
-
-/** 
  * @brief Format version string from numbers.
  * Version number consists of four WORD (16-bit) numbers. This function
  * formats those numbers to string, where numbers are separated by
@@ -266,15 +176,6 @@ bool CVersionInfo::GetFixedFileVersion(unsigned& versionMS, unsigned& versionLS)
 }
 
 /** 
- * @brief Return comment string.
- * @return Comment string.
- */
-String CVersionInfo::GetComments() const
-{
-       return m_strComments;
-}
-
-/** 
  * @brief Read version info from file.
  * This function reads version information from file's version resource
  * to member variables.
index 6fe003c..4c2d99d 100644 (file)
@@ -74,3 +74,103 @@ protected:
        void QueryValue(LPCTSTR szId, String& s);
        bool GetCodepageForLanguage(WORD wLanguage, WORD & wCodePage);
 };
+
+/** 
+ * @brief Return file version string.
+ * @return File version as string.
+ */
+inline String CVersionInfo::GetFileVersion() const
+{
+       return m_strFileVersion;
+}
+
+/** 
+ * @brief Return private build value.
+ * @return Private build number as string.
+ */
+inline String CVersionInfo::GetPrivateBuild() const
+{
+       return m_strPrivateBuild;
+}
+
+/** 
+ * @brief Return special build value.
+ * @return Special build number as string.
+ */
+inline String CVersionInfo::GetSpecialBuild() const
+{
+       return m_strSpecialBuild;
+}
+
+/** 
+ * @brief Return company name.
+ * @return Company name.
+ */
+inline String CVersionInfo::GetCompanyName() const
+{
+       return m_strCompanyName;
+}
+
+/** 
+ * @brief Return file description string.
+ * @return File description string.
+ */
+inline String CVersionInfo::GetFileDescription() const
+{
+       return m_strFileDescription;
+}
+
+/** 
+ * @brief Return internal name.
+ * @return Internal name.
+ */
+inline String CVersionInfo::GetInternalName() const
+{
+       return m_strInternalName;
+}
+
+/** 
+ * @brief Return full file name.
+ * @return full file name.
+ */
+inline String CVersionInfo::GetFullFileName() const
+{
+       return m_strFileName;
+}
+
+/** 
+ * @brief Return copyright info.
+ * @return Copyright info.
+ */
+inline String CVersionInfo::GetLegalCopyright() const
+{
+       return m_strLegalCopyright;
+}
+
+/** 
+ * @brief Return original filename.
+ * @return Original filename.
+ */
+inline String CVersionInfo::GetOriginalFilename() const
+{
+       return m_strOriginalFilename;
+}
+
+/** 
+ * @brief Return product's version number.
+ * @return Product's version number as string.
+ */
+inline String CVersionInfo::GetProductVersion() const
+{
+       return m_strProductVersion;
+}
+
+/** 
+ * @brief Return comment string.
+ * @return Comment string.
+ */
+inline String CVersionInfo::GetComments() const
+{
+       return m_strComments;
+}
+
index 300b629..9c26ff9 100644 (file)
@@ -32,15 +32,6 @@ CompareStats::~CompareStats()
 }
 
 /** 
- * @brief Increase found items (dirs and files) count.
- * @param [in] count Amount of items to add.
- */
-void CompareStats::IncreaseTotalItems(int count /*= 1*/)
-{
-       m_nTotalItems += count;
-}
-
-/** 
  * @brief Add compared item.
  * @param [in] code Resultcode to add.
  */
@@ -56,24 +47,6 @@ void CompareStats::AddItem(int code)
        assert(m_nComparedItems <= m_nTotalItems);
 }
 
-/** 
- * @brief Return count by resultcode.
- * @param [in] result Resultcode to return.
- * @return Count of items for given resultcode.
- */
-int CompareStats::GetCount(CompareStats::RESULT result) const
-{
-       return m_counts[result];
-}
-
-/** 
- * @brief Return total count of items (so far) found.
- */
-int CompareStats::GetTotalItems() const
-{
-       return m_nTotalItems;
-}
-
 /**
 * @brief Return item taking most time among current items.
 */
@@ -129,14 +102,6 @@ void CompareStats::SetCompareState(CompareStats::CMP_STATE state)
 }
 
 /** 
- * @brief Return current comparestate.
- */
-CompareStats::CMP_STATE CompareStats::GetCompareState() const
-{
-       return m_state;
-}
-
-/** 
  * @brief Convert diffcode to compare-result.
  * @param [in] diffcode DIFFITEM.diffcode to convert.
  * @return Compare result.
index d219b3f..c6c0619 100644 (file)
@@ -109,3 +109,38 @@ private:
        std::vector<ThreadState> m_rgThreadState;
 
 };
+
+/** 
+ * @brief Increase found items (dirs and files) count.
+ * @param [in] count Amount of items to add.
+ */
+inline void CompareStats::IncreaseTotalItems(int count)
+{
+       m_nTotalItems += count;
+}
+
+/** 
+ * @brief Return count by resultcode.
+ * @param [in] result Resultcode to return.
+ * @return Count of items for given resultcode.
+ */
+inline int CompareStats::GetCount(CompareStats::RESULT result) const
+{
+       return m_counts[result];
+}
+
+/**
+ * @brief Return total count of items (so far) found.
+ */
+inline int CompareStats::GetTotalItems() const
+{
+       return m_nTotalItems;
+}
+
+/**
+ * @brief Return current comparestate.
+ */
+inline CompareStats::CMP_STATE CompareStats::GetCompareState() const
+{
+       return m_state;
+}
index a2fd79d..f7866d0 100644 (file)
@@ -84,16 +84,6 @@ static String GetCompilerVersion()
        );
 }
 
-
-/** 
- * @brief Return logfile name and path
- */
-String CConfigLog::GetFileName() const
-{
-       return m_sFileName;
-}
-
-
 /** 
  * @brief Get the Modified time of fully qualified file path and name
  */
index 12235cc..e1c78e0 100644 (file)
@@ -62,3 +62,11 @@ private:
        String m_sFileName;
        std::unique_ptr<UniStdioFile> m_pfile;
 };
+
+/**
+ * @brief Return logfile name and path
+ */
+inline String CConfigLog::GetFileName() const
+{
+       return m_sFileName;
+}
index 04840cb..34dc509 100644 (file)
@@ -33,11 +33,3 @@ void DiffFileInfo::ClearPartial()
        encoding.Clear();
        m_textStats.clear();
 }
-
-/**
- * @brief Return true if file is in any Unicode encoding
- */
-bool DiffFileInfo::IsEditableEncoding() const
-{
-       return !encoding.m_bom;
-}
index 1e899e0..fcc464e 100644 (file)
@@ -47,3 +47,11 @@ struct DiffFileInfo : public DirItem
        void ClearPartial();
        bool IsEditableEncoding() const;
 };
+
+/**
+ * @brief Return true if file is in any Unicode encoding
+ */
+inline bool DiffFileInfo::IsEditableEncoding() const
+{
+       return !encoding.m_bom;
+}
index f81b00e..749c237 100644 (file)
@@ -100,17 +100,6 @@ void DiffList::Clear()
 }
 
 /**
- * @brief Returns count of items in diff list.
- * This function returns total amount of items (diffs) in list. So returned
- * count includes significant and non-significant diffs.
- * @note Use GetSignificantDiffs() to get count of non-ignored diffs.
- */
-int DiffList::GetSize() const
-{
-       return (int) m_diffs.size();
-}
-
-/**
  * @brief Returns count of significant diffs in the list.
  * This function returns total count of significant diffs in list. So returned
  * count doesn't include non-significant diffs.
@@ -380,17 +369,6 @@ bool DiffList::GetNextDiff(int nLine, int & nDiff) const
 }
 
 /**
- * @brief Check if diff-list contains significant diffs.
- * @return true if list has significant diffs, false otherwise.
- */
-bool DiffList::HasSignificantDiffs() const
-{
-       if (m_firstSignificant == -1)
-               return false;
-       return true;
-}
-
-/**
  * @brief Return previous diff index from given line.
  * @param [in] nLine First line searched.
  * @return Index for next difference or -1 if no difference is found.
@@ -515,43 +493,6 @@ void DiffList::ConstructSignificantChain()
        }
 }
 
-/**
- * @brief Return index to first significant difference.
- * @return Index of first significant difference.
- */
-int DiffList::FirstSignificantDiff() const
-{
-       return m_firstSignificant;
-}
-
-/**
- * @brief Return index of next significant diff.
- * @param [in] nDiff Index to start looking for next diff.
- * @return Index of next significant difference.
- */
-int DiffList::NextSignificantDiff(int nDiff) const
-{
-       return (int)m_diffs[nDiff].next;
-}
-
-/**
- * @brief Return index of previous significant diff.
- * @param [in] nDiff Index to start looking for previous diff.
- * @return Index of previous significant difference.
- */
-int DiffList::PrevSignificantDiff(int nDiff) const
-{
-       return (int)m_diffs[nDiff].prev;
-}
-
-/**
- * @brief Return index to last significant diff.
- * @return Index of last significant difference.
- */
-int DiffList::LastSignificantDiff() const
-{
-       return m_lastSignificant;
-}
 
 /**
  * @brief Return pointer to first significant diff.
index e34d6e9..37a3f75 100644 (file)
@@ -189,3 +189,61 @@ private:
        int m_lastSignificantRightOnly;
        int m_lastSignificantConflict;
 };
+
+/**
+ * @brief Returns count of items in diff list.
+ * This function returns total amount of items (diffs) in list. So returned
+ * count includes significant and non-significant diffs.
+ * @note Use GetSignificantDiffs() to get count of non-ignored diffs.
+ */
+inline int DiffList::GetSize() const
+{
+       return (int) m_diffs.size();
+}
+
+/**
+ * @brief Check if diff-list contains significant diffs.
+ * @return true if list has significant diffs, false otherwise.
+ */
+inline bool DiffList::HasSignificantDiffs() const
+{
+       return (m_firstSignificant != -1);
+}
+               
+/**
+ * @brief Return index to first significant difference.
+ * @return Index of first significant difference.
+ */
+inline int DiffList::FirstSignificantDiff() const
+{
+       return m_firstSignificant;
+}
+
+/**
+ * @brief Return index of next significant diff.
+ * @param [in] nDiff Index to start looking for next diff.
+ * @return Index of next significant difference.
+ */
+inline int DiffList::NextSignificantDiff(int nDiff) const
+{
+       return (int)m_diffs[nDiff].next;
+}
+
+/**
+ * @brief Return index of previous significant diff.
+ * @param [in] nDiff Index to start looking for previous diff.
+ * @return Index of previous significant difference.
+ */
+inline int DiffList::PrevSignificantDiff(int nDiff) const
+{
+       return (int)m_diffs[nDiff].prev;
+}
+
+/**
+ * @brief Return index to last significant diff.
+ * @return Index of last significant difference.
+ */
+inline int DiffList::LastSignificantDiff() const
+{
+       return m_lastSignificant;
+}
index bf5027b..9d9ba02 100644 (file)
@@ -205,24 +205,6 @@ OnNotifyLineHasBeenEdited(int nLine)
 }
 
 /**
- * @brief Set the folder for temp files.
- * @param [in] path Temp files folder.
- */
-void CDiffTextBuffer::SetTempPath(const String &path)
-{
-       m_strTempPath = path;
-}
-
-/**
- * @brief Is the buffer initialized?
- * @return true if the buffer is initialized, false otherwise.
- */
-bool CDiffTextBuffer::IsInitialized() const
-{
-       return !!m_bInit;
-}
-
-/**
  * @brief Load file from disk into buffer
  *
  * @param [in] pszFileNameInit File to load
index ad8ff78..1eb6bf5 100644 (file)
@@ -80,3 +80,22 @@ public :
                int nStartPos, int nEndLine, int nEndPos,
                int nAction = CE_ACTION_UNKNOWN, bool bHistory = true) override;
 };
+
+/**
+ * @brief Set the folder for temp files.
+ * @param [in] path Temp files folder.
+ */
+inline void CDiffTextBuffer::SetTempPath(const String &path)
+{
+       m_strTempPath = path;
+}
+
+/**
+ * @brief Is the buffer initialized?
+ * @return true if the buffer is initialized, false otherwise.
+ */
+inline bool CDiffTextBuffer::IsInitialized() const
+{
+       return !!m_bInit;
+}
+
index 69507af..97d130e 100644 (file)
@@ -72,15 +72,6 @@ CDiffThread::~CDiffThread()
 }
 
 /**
- * @brief Sets context pointer forwarded to thread.
- * @param [in] pCtx Pointer to compare context.
- */
-void CDiffThread::SetContext(CDiffContext * pCtx)
-{
-       m_pDiffContext = pCtx;
-}
-
-/**
  * @brief runtime interface for child thread, called on child thread
  */
 bool CDiffThread::ShouldAbort() const
@@ -117,14 +108,6 @@ unsigned CDiffThread::CompareDirectories()
 }
 
 /**
- * @brief Returns thread's current state
- */
-unsigned CDiffThread::GetThreadState() const
-{
-       return m_pDiffParm->nThreadState;
-}
-
-/**
  * @brief Item collection thread function.
  *
  * This thread is responsible for finding and collecting all items to compare
index 62ea77d..738009e 100644 (file)
@@ -118,3 +118,20 @@ private:
        bool m_bAborting; /**< Is compare aborting? */
        bool m_bPaused; /**< Is compare paused? */
 };
+
+/**
+ * @brief Sets context pointer forwarded to thread.
+ * @param [in] pCtx Pointer to compare context.
+ */
+inline void CDiffThread::SetContext(CDiffContext * pCtx)
+{
+       m_pDiffContext = pCtx;
+}
+
+/**
+ * @brief Returns thread's current state
+ */
+inline unsigned CDiffThread::GetThreadState() const
+{
+       return m_pDiffParm->nThreadState;
+}
index 678c571..015edde 100644 (file)
@@ -102,15 +102,6 @@ CDiffWrapper::~CDiffWrapper()
 }
 
 /**
- * @brief Set plugins enabled/disabled.
- * @param [in] enable if true plugins are enabled.
- */
-void CDiffWrapper::EnablePlugins(bool enable)
-{
-       m_bPluginsEnabled = enable;
-}
-
-/**
  * @brief Enables/disables patch-file creation and sets filename.
  * This function enables or disables patch file creation. When
  * @p filename is empty, patch files are disabled.
@@ -178,14 +169,6 @@ void CDiffWrapper::SetOptions(const DIFFOPTIONS *options)
        m_options.SetFromDiffOptions(*options);
 }
 
-/**
- * @brief Set text tested to find the prediffer automatically.
- * Most probably a concatenated string of both filenames.
- */
-void CDiffWrapper::SetTextForAutomaticPrediff(const String &text)
-{
-       m_sToFindPrediffer = text;
-}
 void CDiffWrapper::SetPrediffer(const PrediffingInfo * prediffer /*= nullptr*/)
 {
        // all flags are set correctly during the construction
@@ -194,10 +177,6 @@ void CDiffWrapper::SetPrediffer(const PrediffingInfo * prediffer /*= nullptr*/)
        if (prediffer != nullptr)
                *m_infoPrediffer = *prediffer;
 }
-void CDiffWrapper::GetPrediffer(PrediffingInfo * prediffer) const
-{
-       *prediffer = *m_infoPrediffer;
-}
 
 /**
  * @brief Set options used for patch-file creation.
@@ -661,29 +640,6 @@ void CDiffWrapper::SetPaths(const PathContext &tFiles,
 }
 
 /**
- * @brief Set source paths for original (NON-TEMP) diffing two files.
- * Sets full paths to two (NON-TEMP) files we are diffing.
- * @param [in] OriginalFile1 First file to compare "(NON-TEMP) file".
- * @param [in] OriginalFile2 Second file to compare "(NON-TEMP) file".
- */
-void CDiffWrapper::SetCompareFiles(const PathContext &originalFile)
-{
-       m_originalFile = originalFile;
-}
-
-/**
- * @brief Set alternative paths for compared files.
- * Sets alternative paths for diff'ed files. These alternative paths might not
- * be real paths. For example when creating a patch file from folder compare
- * we want to use relative paths.
- * @param [in] altPaths Alternative file paths.
- */
-void CDiffWrapper::SetAlternativePaths(const PathContext &altPaths)
-{
-       m_alternativePaths = altPaths;
-}
-
-/**
  * @brief Runs diff-engine.
  */
 bool CDiffWrapper::RunFileDiff()
index bc0b8bc..d78ccaa 100644 (file)
@@ -30,6 +30,7 @@
 #include "CompareOptions.h"
 #include "DiffList.h"
 #include "UnicodeString.h"
+#include "FileTransform.h"
 
 class CDiffContext;
 class PrediffingInfo;
@@ -240,3 +241,50 @@ private:
        const FilterCommentsManager* m_pFilterCommentsManager; /**< Comments filtering manager */
        bool m_bPluginsEnabled; /**< Are plugins enabled? */
 };
+
+/**
+ * @brief Set text tested to find the prediffer automatically.
+ * Most probably a concatenated string of both filenames.
+ */
+inline void CDiffWrapper::SetTextForAutomaticPrediff(const String &text)
+{
+       m_sToFindPrediffer = text;
+}
+
+inline void CDiffWrapper::GetPrediffer(PrediffingInfo * prediffer) const
+{
+       *prediffer = *m_infoPrediffer;
+}
+
+/**
+ * @brief Set plugins enabled/disabled.
+ * @param [in] enable if true plugins are enabled.
+ */
+inline void CDiffWrapper::EnablePlugins(bool enable)
+{
+       m_bPluginsEnabled = enable;
+}
+
+/**
+ * @brief Set source paths for original (NON-TEMP) diffing two files.
+ * Sets full paths to two (NON-TEMP) files we are diffing.
+ * @param [in] OriginalFile1 First file to compare "(NON-TEMP) file".
+ * @param [in] OriginalFile2 Second file to compare "(NON-TEMP) file".
+ */
+inline void CDiffWrapper::SetCompareFiles(const PathContext &originalFile)
+{
+       m_originalFile = originalFile;
+}
+
+/**
+ * @brief Set alternative paths for compared files.
+ * Sets alternative paths for diff'ed files. These alternative paths might not
+ * be real paths. For example when creating a patch file from folder compare
+ * we want to use relative paths.
+ * @param [in] altPaths Alternative file paths.
+ */
+inline void CDiffWrapper::SetAlternativePaths(const PathContext &altPaths)
+{
+       m_alternativePaths = altPaths;
+}
+
index 2ee64ff..46a2095 100644 (file)
@@ -87,15 +87,6 @@ BOOL DirCompProgressBar::Create(CWnd* pParentWnd)
                      // EXCEPTION: OCX Property Pages should return FALSE
 }
 
-/**
- * @brief Set pointer to compare stats.
- * @param [in] pCompareStats Pointer to stats.
- */
-void DirCompProgressBar::SetCompareStat(CompareStats * pCompareStats)
-{
-       m_pCompareStats = pCompareStats;
-}
-
 void DirCompProgressBar::SetProgressState(int comparedItems, int totalItems)
 {
        CProgressCtrl *pProg = (CProgressCtrl*) GetDlgItem(IDC_PROGRESSCOMPARE);
index 2e20c5b..9724861 100644 (file)
@@ -68,3 +68,12 @@ private:
 #endif
 };
 
+/**
+ * @brief Set pointer to compare stats.
+ * @param [in] pCompareStats Pointer to stats.
+ */
+inline void DirCompProgressBar::SetCompareStat(CompareStats * pCompareStats)
+{
+       m_pCompareStats = pCompareStats;
+}
+
index d38a572..b98f789 100644 (file)
@@ -562,30 +562,6 @@ void CDirDoc::RefreshOptions()
 }
 
 /**
- * @brief Set left/middle/right side readonly-status
- * @param nIndex Select side to set 
- * @param bReadOnly New status of selected side
- */
-void CDirDoc::SetReadOnly(int nIndex, bool bReadOnly)
-{
-       m_bRO[nIndex] = bReadOnly;
-}
-
-/**
- * @brief Return left/middle/right side readonly-status
- * @param nIndex Select side to ask
- */
-bool CDirDoc::GetReadOnly(int nIndex) const
-{
-       return m_bRO[nIndex];
-}
-
-const bool *CDirDoc::GetReadOnly(void) const
-{
-       return m_bRO;
-}
-
-/**
  * @brief Write path and filename to headerbar
  * @note SetText() does not repaint unchanged text
  */
index e2717eb..091b62d 100644 (file)
@@ -147,3 +147,28 @@ private:
        bool m_bGeneratingReport;
        std::unique_ptr<DirCmpReport> m_pReport;
 };
+
+/**
+ * @brief Set left/middle/right side readonly-status
+ * @param nIndex Select side to set 
+ * @param bReadOnly New status of selected side
+ */
+inline void CDirDoc::SetReadOnly(int nIndex, bool bReadOnly)
+{
+       m_bRO[nIndex] = bReadOnly;
+}
+
+/**
+ * @brief Return left/middle/right side readonly-status
+ * @param nIndex Select side to ask
+ */
+inline bool CDirDoc::GetReadOnly(int nIndex) const
+{
+       return m_bRO[nIndex];
+}
+
+inline const bool *CDirDoc::GetReadOnly(void) const
+{
+       return m_bRO;
+}
+
index 747b589..35db54d 100644 (file)
@@ -170,13 +170,6 @@ void CDirFrame::SetFilterStatusDisplay(LPCTSTR szFilter)
 }
 
 /**
- * @brief Get the interface to the header (path) bar
- */
-IHeaderBar * CDirFrame::GetHeaderInterface() {
-       return &m_wndFilePathBar;
-}
-
-/**
  * @brief Restore maximized state of directory compare window
  */
 void CDirFrame::ActivateFrame(int nCmdShow) 
index 4168e99..71eacee 100644 (file)
@@ -75,3 +75,10 @@ protected:
        DECLARE_MESSAGE_MAP()
 };
 
+/**
+ * @brief Get the interface to the header (path) bar
+ */
+inline IHeaderBar * CDirFrame::GetHeaderInterface() {
+       return &m_wndFilePathBar;
+}
+
index 19b4c2d..2bbf08c 100644 (file)
@@ -35,6 +35,7 @@
 #include "MergeApp.h"
 #include "OptionsDef.h"
 #include "OptionsMgr.h"
+#include "PathContext.h"
 #include "DebugNew.h"
 
 using Poco::NotificationQueue;
index 7d3d819..2129bb4 100644 (file)
@@ -89,11 +89,6 @@ CSize CEditorFilePathBar::CalcFixedLayout(BOOL bStretch, BOOL bHorz)
        return CSize(SHRT_MAX, tm.tmHeight + 6);
 }
 
-void CEditorFilePathBar::SetPaneCount(int nPanes)
-{
-       m_nPanes = nPanes;
-}
-
 /** 
  * @brief Resize both controls to an equal size.
  */
@@ -112,14 +107,6 @@ void CEditorFilePathBar::Resize()
 }
 
 /** 
- * @brief Set callback function on EN_SETFOCUS notification
- */
-void CEditorFilePathBar::SetOnSetFocusCallback(const std::function<void(int)> callbackfunc)
-{
-       m_callbackfunc = callbackfunc;
-}
-
-/** 
  * @brief Set widths.
  * This function resizes both controls to given size. The width is usually
  * same as the splitter view width.
index d456310..0531d9d 100644 (file)
@@ -85,3 +85,17 @@ private:
        int m_nPanes;
        std::function<void(int)> m_callbackfunc;
 };
+
+inline void CEditorFilePathBar::SetPaneCount(int nPanes)
+{
+       m_nPanes = nPanes;
+}
+
+/** 
+ * @brief Set callback function on EN_SETFOCUS notification
+ */
+inline void CEditorFilePathBar::SetOnSetFocusCallback(const std::function<void(int)> callbackfunc)
+{
+       m_callbackfunc = callbackfunc;
+}
+
index bc55839..e3eb86a 100644 (file)
@@ -68,33 +68,6 @@ FileActionItem FileActionScript::RemoveTailActionItem()
 }
 
 /**
- * @brief Set parent window used for showing MessageBoxes.
- * @param [in] hWnd Handle to parent window.
- */
-void FileActionScript::SetParentWindow(HWND hWnd)
-{
-       m_hParentWindow = hWnd;
-}
-
-/**
- * @brief Does user want to move deleted files to Recycle Bin?
- * @param [in] bUseRecycleBin If `true` deleted files are moved to Recycle Bin.
- */
-void FileActionScript::UseRecycleBin(bool bUseRecycleBin)
-{
-       m_bUseRecycleBin = bUseRecycleBin;
-}
-
-/**
- * @brief Return amount of actions (copy, move, etc) in script.
- * @return Amount of actions.
- */
-size_t FileActionScript::GetActionItemCount() const
-{
-       return m_actions.size();
-}
-
-/**
  * @brief Create ShellFileOperations operation lists from our scripts.
  *
  * We use ShellFileOperations internally to do actual file operations.
index ae2ecf9..14871f2 100644 (file)
@@ -149,3 +149,31 @@ private:
        bool m_bUseRecycleBin; /**< Use recycle bin for script actions? */
        HWND m_hParentWindow; /**< Parent window for showing messages */
 };
+
+/**
+ * @brief Set parent window used for showing MessageBoxes.
+ * @param [in] hWnd Handle to parent window.
+ */
+inline void FileActionScript::SetParentWindow(HWND hWnd)
+{
+       m_hParentWindow = hWnd;
+}
+
+/**
+ * @brief Does user want to move deleted files to Recycle Bin?
+ * @param [in] bUseRecycleBin If `true` deleted files are moved to Recycle Bin.
+ */
+inline void FileActionScript::UseRecycleBin(bool bUseRecycleBin)
+{
+       m_bUseRecycleBin = bUseRecycleBin;
+}
+
+/**
+ * @brief Return amount of actions (copy, move, etc) in script.
+ * @return Amount of actions.
+ */
+inline size_t FileActionScript::GetActionItemCount() const
+{
+       return m_actions.size();
+}
+
index 60ede23..4261246 100644 (file)
@@ -50,14 +50,6 @@ FileFilterHelper::~FileFilterHelper()
 {
 }
 
-/** 
- * @brief Return filtermanager used.
- */
-FileFilterMgr * FileFilterHelper::GetManager() const
-{
-       return m_fileFilterMgr.get();
-}
-
 /**
  * @brief Store current filter path.
  *
@@ -331,14 +323,6 @@ String FileFilterHelper::ParseExtensions(const String &extensions) const
 }
 
 /** 
- * @brief Returns true if active filter is a mask.
- */
-bool FileFilterHelper::IsUsingMask() const
-{
-       return m_bUseMask;
-}
-
-/** 
  * @brief Returns active filter (or mask string)
  * @return The active filter.
  */
index 6fd7348..a62f61f 100644 (file)
@@ -159,3 +159,20 @@ private:
        String m_sGlobalFilterPath;    /*< Path for shared filters */
        String m_sUserSelFilterPath;     /*< Path for user's private filters */
 };
+
+/**
+ * @brief Return filtermanager used.
+ */
+inline FileFilterMgr * FileFilterHelper::GetManager() const
+{
+       return m_fileFilterMgr.get();
+}
+
+/**
+ * @brief Returns true if active filter is a mask.
+ */
+inline bool FileFilterHelper::IsUsingMask() const
+{
+       return m_bUseMask;
+}
+
index 11ef3a7..3f39124 100644 (file)
@@ -340,70 +340,6 @@ bool FileFilterMgr::TestDirNameAgainstFilter(const FileFilter * pFilter,
 }
 
 /**
- * @brief Return name of filter.
- *
- * @param [in] i Index of filter.
- * @return Name of filter in given index.
- */
-String FileFilterMgr::GetFilterName(int i) const
-{
-       return m_filters[i]->name; 
-}
-
-/**
- * @brief Return name of filter.
- * @param [in] pFilter Filter to get name for.
- * @return Given filter's name.
- */
-String FileFilterMgr::GetFilterName(const FileFilter *pFilter) const
-{
-       return pFilter->name; 
-}
-
-/**
- * @brief Return description of filter.
- *
- * @param [in] i Index of filter.
- * @return Description of filter in given index.
- */
-String FileFilterMgr::GetFilterDesc(int i) const
-{
-       return m_filters[i]->description; 
-}
-
-/**
- * @brief Return description of filter.
- * @param [in] pFilter Filter to get description for.
- * @return Given filter's description.
- */
-String FileFilterMgr::GetFilterDesc(const FileFilter *pFilter) const
-{
-       return pFilter->description;
-}
-
-/**
- * @brief Return full path to filter.
- *
- * @param [in] i Index of filter.
- * @return Full path of filter in given index.
- */
-String FileFilterMgr::GetFilterPath(int i) const
-{
-       return m_filters[i]->fullpath;
-}
-
-/**
- * @brief Return full path to filter.
- *
- * @param [in] pFilter Pointer to filter.
- * @return Full path of filter.
- */
-String FileFilterMgr::GetFullpath(FileFilter * pfilter) const
-{
-       return pfilter->fullpath;
-}
-
-/**
  * @brief Reload filter from disk
  *
  * Reloads filter from disk. This is done by creating a new one
index 10ee1d7..8f57515 100644 (file)
@@ -91,3 +91,67 @@ private:
 
 bool TestAgainstRegList(const std::vector<FileFilterElementPtr> *filterList, const String& szTest);
 void EmptyFilterList(std::vector<FileFilterElementPtr> *filterList);
+
+/**
+ * @brief Return name of filter.
+ *
+ * @param [in] i Index of filter.
+ * @return Name of filter in given index.
+ */
+inline String FileFilterMgr::GetFilterName(int i) const
+{
+       return m_filters[i]->name; 
+}
+
+/**
+ * @brief Return name of filter.
+ * @param [in] pFilter Filter to get name for.
+ * @return Given filter's name.
+ */
+inline String FileFilterMgr::GetFilterName(const FileFilter *pFilter) const
+{
+       return pFilter->name; 
+}
+
+/**
+ * @brief Return description of filter.
+ *
+ * @param [in] i Index of filter.
+ * @return Description of filter in given index.
+ */
+inline String FileFilterMgr::GetFilterDesc(int i) const
+{
+       return m_filters[i]->description; 
+}
+
+/**
+ * @brief Return description of filter.
+ * @param [in] pFilter Filter to get description for.
+ * @return Given filter's description.
+ */
+inline String FileFilterMgr::GetFilterDesc(const FileFilter *pFilter) const
+{
+       return pFilter->description;
+}
+
+/**
+ * @brief Return full path to filter.
+ *
+ * @param [in] i Index of filter.
+ * @return Full path of filter in given index.
+ */
+inline String FileFilterMgr::GetFilterPath(int i) const
+{
+       return m_filters[i]->fullpath;
+}
+
+/**
+ * @brief Return full path to filter.
+ *
+ * @param [in] pFilter Pointer to filter.
+ * @return Full path of filter.
+ */
+inline String FileFilterMgr::GetFullpath(FileFilter * pfilter) const
+{
+       return pfilter->fullpath;
+}
index e9744f7..5e49f73 100644 (file)
@@ -23,25 +23,6 @@ FileVersion::FileVersion()
 }
 
 /**
- * @brief Reset version data to zeroes.
- */
-void FileVersion::Clear()
-{
-       m_fileVersionMS = m_fileVersionLS = 0xffffffff;
-}
-
-/**
- * @brief Set file version number.
- * @param [in] versionMS Most significant dword for version.
- * @param [in] versionLS Least significant dword for version.
- */
-void FileVersion::SetFileVersion(unsigned versionMS, unsigned versionLS)
-{
-       m_fileVersionMS = versionMS;
-       m_fileVersionLS = versionLS;
-}
-
-/**
  * @brief Get file version as a string.
  * @return File version number as a string. Returns empty string if there is
  * no version number for the file.
index 69ff657..8c08df0 100644 (file)
@@ -27,3 +27,23 @@ public:
        String GetFileVersionString() const;
        uint64_t GetFileVersionQWORD() const { return (static_cast<uint64_t>(m_fileVersionMS) << 32) + m_fileVersionLS; };
 };
+
+/**
+ * @brief Reset version data to zeroes.
+ */
+inline void FileVersion::Clear()
+{
+       m_fileVersionMS = m_fileVersionLS = 0xffffffff;
+}
+
+/**
+ * @brief Set file version number.
+ * @param [in] versionMS Most significant dword for version.
+ * @param [in] versionLS Least significant dword for version.
+ */
+inline void FileVersion::SetFileVersion(unsigned versionMS, unsigned versionLS)
+{
+       m_fileVersionMS = versionMS;
+       m_fileVersionLS = versionLS;
+}
+
index 6b7dfb0..4f87a29 100644 (file)
@@ -129,15 +129,6 @@ bool CFilepathEdit::SubClassEdit(UINT nID, CWnd* pParent)
 };
 
 /**
- * @brief Return the control's original text.
- * @return Control's original text.
- */
-void CFilepathEdit::GetOriginalText(String& rString) const
-{              
-       rString = m_sOriginalText;
-}
-
-/**
  * @brief Set the text to show in the control.
  * This function sets the text (original text) to show in the control.
  * The control may modify the text for displaying in the GUI.
index 490a0a5..8938654 100644 (file)
@@ -65,3 +65,13 @@ private:
        COLORREF m_crBackGnd; /**< Control's background color. */
        CBrush m_brBackGnd; /**< Background brush for the control. */
 };
+
+/**
+ * @brief Return the control's original text.
+ * @return Control's original text.
+ */
+inline void CFilepathEdit::GetOriginalText(String& rString) const
+{              
+       rString = m_sOriginalText;
+}
+
index cf3512b..a4bf586 100644 (file)
@@ -48,23 +48,6 @@ void FilterList::AddRegExp(const std::string& regularExpression)
 }
 
 /** 
- * @brief Removes all expressions from the list.
- */
-void FilterList::RemoveAllFilters()
-{
-       m_list.clear();
-}
-
-/** 
- * @brief Returns if list has any expressions.
- * @return true if list contains one or more expressions.
- */
-bool FilterList::HasRegExps() const
-{
-       return !m_list.empty();
-}
-
-/** 
  * @brief Match string against list of expressions.
  * This function matches given @p string against the list of regular
  * expressions. The matching ends when first match is found, so all
@@ -114,12 +97,3 @@ bool FilterList::Match(const std::string& string, int codepage/*=CP_UTF8*/)
        return retval;
 }
 
-/** 
- * @brief Returns the last matched expression (if any).
- * This function returns the regular expression string that matched last.
- * @return Last matched expression, or `nullptr` in case no matches yet.
- */
-const char * FilterList::GetLastMatchExpression() const
-{
-       return m_lastMatchExpression->c_str();
-}
index 880bce2..ae8e2d1 100644 (file)
@@ -48,3 +48,30 @@ private:
        const std::string *m_lastMatchExpression;
 
 };
+
+/** 
+ * @brief Removes all expressions from the list.
+ */
+inline void FilterList::RemoveAllFilters()
+{
+       m_list.clear();
+}
+
+/** 
+ * @brief Returns if list has any expressions.
+ * @return true if list contains one or more expressions.
+ */
+inline bool FilterList::HasRegExps() const
+{
+       return !m_list.empty();
+}
+
+/** 
+ * @brief Returns the last matched expression (if any).
+ * This function returns the regular expression string that matched last.
+ * @return Last matched expression, or `nullptr` in case no matches yet.
+ */
+inline const char * FilterList::GetLastMatchExpression() const
+{
+       return m_lastMatchExpression->c_str();
+}
index 851496d..19ac526 100644 (file)
@@ -270,12 +270,6 @@ void CHexMergeFrame::UpdateHeaderSizes()
        }
 }
 
-IHeaderBar *CHexMergeFrame::GetHeaderInterface()
-{
-       return &m_wndFilePathBar;
-}
-
-
 void CHexMergeFrame::UpdateAutoPaneResize()
 {
        m_wndSplitter.AutoResizePanes(GetOptionsMgr()->GetBool(OPT_RESIZE_PANES));
index 7b02e76..fa37a80 100644 (file)
@@ -89,3 +89,9 @@ private:
        //}}AFX_MSG
        DECLARE_MESSAGE_MAP()
 };
+
+inline IHeaderBar *CHexMergeFrame::GetHeaderInterface()
+{
+       return &m_wndFilePathBar;
+}
+
index 7f29641..9f0cf38 100644 (file)
@@ -45,23 +45,6 @@ void LineFiltersList::AddFilter(const String& filter, bool enabled)
 }
 
 /**
- * @brief Returns count of items in the list.
- * @return Count of filters in the list.
- */
-size_t LineFiltersList::GetCount() const
-{
-       return m_items.size();
-}
-
-/**
- * @brief Empties the list.
- */
-void LineFiltersList::Empty()
-{
-       m_items.clear();
-}
-
-/**
  * @brief Returns the filter list as one filter string.
  * This function returns the list of filters as one string that can be
  * given to regular expression engine as filter. Filter strings in
index 0d1fb2f..1f770e4 100644 (file)
@@ -49,3 +49,20 @@ private:
        std::vector<LineFilterItemPtr> m_items; /**< List for linefilter items */
        COptionsMgr * m_pOptionsMgr; /**< Options-manager for storage */
 };
+
+/**
+ * @brief Returns count of items in the list.
+ * @return Count of filters in the list.
+ */
+inline size_t LineFiltersList::GetCount() const
+{
+       return m_items.size();
+}
+
+/**
+ * @brief Empties the list.
+ */
+inline void LineFiltersList::Empty()
+{
+       m_items.clear();
+}
index 8736463..2f4ac52 100644 (file)
@@ -1034,14 +1034,6 @@ void CLocationView::DrawConnectLines(CDC *pClientDC)
 }
 
 /** 
- * @brief Stores HWND of frame window (CMergeEditFrame).
- */
-void CLocationView::SetFrameHwnd(HWND hwndFrame)
-{
-       m_hwndFrame = hwndFrame;
-}
-
-/** 
  * @brief Request frame window to store sizes.
  *
  * When locationview size changes we want to save new size
index 3dfb723..a5708fa 100644 (file)
@@ -131,3 +131,12 @@ protected:
 inline CMergeDoc* CLocationView::GetDocument()
    { return reinterpret_cast<CMergeDoc*>(m_pDocument); }
 #endif
+
+/** 
+ * @brief Stores HWND of frame window (CMergeEditFrame).
+ */
+inline void CLocationView::SetFrameHwnd(HWND hwndFrame)
+{
+       m_hwndFrame = hwndFrame;
+}
+
index 783f848..d38f86b 100644 (file)
@@ -517,15 +517,6 @@ int CMergeApp::DoMessageBox(LPCTSTR lpszPrompt, UINT nType, UINT nIDPrompt)
        return static_cast<int>(dlgMessage.DoModal());
 }
 
-/** 
- * @brief Set flag so that application will broadcast notification at next
- * idle time (via WM_TIMER id=IDLE_TIMER)
- */
-void CMergeApp::SetNeedIdleTimer()
-{
-       m_bNeedIdleTimer = true; 
-}
-
 bool CMergeApp::IsReallyIdle() const
 {
        bool idle = true;
index 47e15a8..5f9d0ca 100644 (file)
@@ -180,3 +180,13 @@ private:
 };
 
 extern CMergeApp theApp;
+
+/** 
+ * @brief Set flag so that application will broadcast notification at next
+ * idle time (via WM_TIMER id=IDLE_TIMER)
+ */
+inline void CMergeApp::SetNeedIdleTimer()
+{
+       m_bNeedIdleTimer = true; 
+}
+
index dbb14fc..a9cde07 100644 (file)
@@ -3475,14 +3475,6 @@ void CMergeDoc::ClearSyncPoints()
        FlushAndRescan(true);
 }
 
-/**
- * @brief return true if there are synchronization points
- */
-bool CMergeDoc::HasSyncPoints()
-{
-       return m_bHasSyncPoints;
-}
-
 std::vector<std::vector<int> > CMergeDoc::GetSyncPointList()
 {
        std::vector<std::vector<int> > list;
index 9ad6d43..765e2b7 100644 (file)
@@ -393,3 +393,12 @@ private:
        String GetFileExt(LPCTSTR sFileName, LPCTSTR sDescription) const;
        void DoFileSave(int pane);
 };
+
+/**
+ * @brief return true if there are synchronization points
+ */
+inline bool CMergeDoc::HasSyncPoints()
+{
+       return m_bHasSyncPoints;
+}
+
index 6d2aeef..3a94165 100644 (file)
@@ -2337,16 +2337,6 @@ void CMergeEditView::OnRefresh()
 }
 
 /**
- * @brief Enable/Disable automatic rescanning
- */
-bool CMergeEditView::EnableRescan(bool bEnable)
-{
-       bool bOldValue = m_bAutomaticRescan;
-       m_bAutomaticRescan = bEnable;
-       return bOldValue;
-}
-
-/**
  * @brief Handle some keys when in merging mode
  */
 bool CMergeEditView::MergeModeKeyDown(MSG* pMsg)
@@ -3770,15 +3760,6 @@ void CMergeEditView::OnViewSwapPanes()
 }
 
 /**
- * @brief Check if cursor is inside difference.
- * @return true if cursor is inside difference.
- */
-bool CMergeEditView::IsCursorInDiff() const
-{
-       return m_bCurrentLineIsDiff;
-}
-
-/**
 * @brief Determine if difference is visible on screen.
 * @param [in] nDiff Number of diff to check.
 * @return true if difference is visible.
index 1d152ca..e996300 100644 (file)
@@ -351,3 +351,23 @@ protected:
 inline CMergeDoc* CMergeEditView::GetDocument()
    { return reinterpret_cast<CMergeDoc*>(m_pDocument); }
 #endif
+
+/**
+ * @brief Enable/Disable automatic rescanning
+ */
+inline bool CMergeEditView::EnableRescan(bool bEnable)
+{
+       bool bOldValue = m_bAutomaticRescan;
+       m_bAutomaticRescan = bEnable;
+       return bOldValue;
+}
+
+/**
+ * @brief Check if cursor is inside difference.
+ * @return true if cursor is inside difference.
+ */
+inline bool CMergeEditView::IsCursorInDiff() const
+{
+       return m_bCurrentLineIsDiff;
+}
+
index d308a6b..8d23f48 100644 (file)
@@ -350,42 +350,6 @@ void CPatchDlg::OnDiffSwapFiles()
 }
 
 /** 
- * @brief Add patch item to internal list.
- * @param [in] pf Patch item to add.
- */
-void CPatchDlg::AddItem(const PATCHFILES& pf)
-{
-       m_fileList.push_back(pf);
-}
-
-/** 
- * @brief Returns amount of patch items in the internal list.
- * @return Count of patch items in the list.
- */
-size_t CPatchDlg::GetItemCount()
-{
-       return m_fileList.size();
-}
-
-/** 
- * @brief Return item in the internal list at given position
- * @param [in] position Zero-based index of item to get
- * @return PATCHFILES from given position.
- */
-const PATCHFILES& CPatchDlg::GetItemAt(size_t position)
-{
-       return m_fileList.at(position);
-}
-
-/** 
- * @brief Empties internal item list.
- */
-void CPatchDlg::ClearItems()
-{
-       m_fileList.clear();
-}
-
-/** 
  * @brief Updates patch dialog settings from member variables.
  */
 void CPatchDlg::UpdateSettings()
index f96f2ea..2da7166 100644 (file)
@@ -103,3 +103,40 @@ protected:
        //}}AFX_MSG
        DECLARE_MESSAGE_MAP()
 };
+
+/** 
+ * @brief Add patch item to internal list.
+ * @param [in] pf Patch item to add.
+ */
+inline void CPatchDlg::AddItem(const PATCHFILES& pf)
+{
+       m_fileList.push_back(pf);
+}
+
+/** 
+ * @brief Returns amount of patch items in the internal list.
+ * @return Count of patch items in the list.
+ */
+inline size_t CPatchDlg::GetItemCount()
+{
+       return m_fileList.size();
+}
+
+/** 
+ * @brief Return item in the internal list at given position
+ * @param [in] position Zero-based index of item to get
+ * @return PATCHFILES from given position.
+ */
+inline const PATCHFILES& CPatchDlg::GetItemAt(size_t position)
+{
+       return m_fileList.at(position);
+}
+
+/** 
+ * @brief Empties internal item list.
+ */
+inline void CPatchDlg::ClearItems()
+{
+       m_fileList.clear();
+}
+
index 76e3a3a..5e9d62e 100644 (file)
@@ -30,25 +30,6 @@ String PathInfo::GetPath(bool bNormalized /*= true*/) const
                return m_sPath;
 }
 
-String& PathInfo::GetRef()
-{ 
-       return m_sPath;
-}
-
-/**
- * @brief Set path.
- * @param [in] sPath New path for item.
- */
-void PathInfo::SetPath(const TCHAR *sPath)
-{
-       m_sPath = sPath;
-}
-
-void PathInfo::SetPath(const String & sPath)
-{
-       m_sPath = sPath;
-}
-
 /**
  * @brief Normalize path.
  */
@@ -114,32 +95,6 @@ void PathContext::SetAt(int nIndex, const String& newElement)
        m_path[nIndex].SetPath(newElement);
 }
 
-String PathContext::operator[](int nIndex) const
-{
-       return GetAt(nIndex);
-}
-
-String& PathContext::operator[](int nIndex)
-{
-       return GetElement(nIndex);
-}
-
-/**
- * @brief set number of files.
- */
-void PathContext::SetSize(int nFiles)
-{
-       m_nFiles = nFiles;
-}
-
-/**
- * @brief Return number of files.
- */
-int PathContext::GetSize() const
-{
-       return m_nFiles;
-}
-
 /**
  * @brief Empty m_path array
  */
@@ -262,13 +217,3 @@ void PathContext::Swap()
        else
                m_path[0].m_sPath.swap(m_path[2].m_sPath);
 }
-
-PathContextIterator PathContext::begin() const
-{
-       return PathContextIterator(this);
-}
-
-PathContextIterator PathContext::end() const
-{
-       return PathContextIterator();
-}
index 72feded..b0a3f1b 100644 (file)
@@ -24,7 +24,7 @@ public:
        PathInfo(const PathInfo &pi);
 
        String GetPath(bool bNormalized = true) const;
-       String& GetRef();
+       String& GetRef() { return m_sPath; }
        void SetPath(const TCHAR *path);
        void SetPath(const String & path);
        void NormalizePath();
@@ -34,6 +34,20 @@ private:
 };
 
 /**
+ * @brief Set path.
+ * @param [in] sPath New path for item.
+ */
+inline void PathInfo::SetPath(const TCHAR *sPath)
+{
+       m_sPath = sPath;
+}
+
+inline void PathInfo::SetPath(const String & sPath)
+{
+       m_sPath = sPath;
+}
+
+/**
  * @brief Holds path information of compared files/directories.
  */
 class PathContext
@@ -51,8 +65,8 @@ public:
        String GetAt(int nIndex) const;
        String& GetElement(int nIndex);
        void SetAt(int nIndex, const String& newElement);
-       String operator[](int nIndex) const;
-       String& operator[](int nIndex);
+       String operator[](int nIndex) const { return GetAt(nIndex); }
+       String& operator[](int nIndex) { return GetElement(nIndex); }
 
        String GetLeft(bool bNormalized = true) const;
        String GetRight(bool bNormalized = true) const;
@@ -74,6 +88,22 @@ private:
        PathInfo m_path[3]; /**< First, second, third path (left path at start) */
 };
 
+/**
+ * @brief set number of files.
+ */
+inline void PathContext::SetSize(int nFiles)
+{
+       m_nFiles = nFiles;
+}
+
+/**
+ * @brief Return number of files.
+ */
+inline int PathContext::GetSize() const
+{
+       return m_nFiles;
+}
+
 class PathContextIterator : public std::iterator<std::forward_iterator_tag, String>
 {
 public:
@@ -122,3 +152,13 @@ public:
        const PathContext *m_pPathContext;
        int m_sel;
 };
+
+inline PathContextIterator PathContext::begin() const
+{
+       return PathContextIterator(this);
+}
+
+inline PathContextIterator PathContext::end() const
+{
+       return PathContextIterator();
+}
index 8beff24..85a9d03 100755 (executable)
@@ -168,50 +168,6 @@ const String ProjectFile::PROJECTFILE_EXT = toTString("WinMerge");
 }
 
 /** 
- * @brief Returns if left path is defined in project file.
- * @return true if project file has left path.
- */
-bool ProjectFileItem::HasLeft() const
-{
-       return m_bHasLeft;
-}
-
-/** 
- * @brief Returns if middle path is defined.
- */
-bool ProjectFileItem::HasMiddle() const
-{
-       return m_bHasMiddle;
-}
-
-/** 
- * @brief Returns if right path is defined in project file.
- * @return true if project file has right path.
- */
-bool ProjectFileItem::HasRight() const
-{
-       return m_bHasRight;
-}
-
-/** 
- * @brief Returns if filter is defined in project file.
- * @return true if project file has filter.
- */
-bool ProjectFileItem::HasFilter() const
-{
-       return m_bHasFilter;
-}
-
-/** 
- * @brief Returns if subfolder is defined in projectfile.
- * @return true if project file has subfolder definition.
- */
-bool ProjectFileItem::HasSubfolders() const
-{
-       return m_bHasSubfolders;
-}
-
-/** 
  * @brief Returns left path.
  * @param [out] pReadOnly true if readonly was specified for path.
  * @return Left path.
@@ -224,15 +180,6 @@ String ProjectFileItem::GetLeft(bool * pReadOnly /*= nullptr*/) const
 }
 
 /** 
- * @brief Returns if left path is specified read-only.
- * @return true if left path is read-only, false otherwise.
- */
-bool ProjectFileItem::GetLeftReadOnly() const
-{
-       return m_bLeftReadOnly;
-}
-
-/** 
  * @brief Set left path, returns old left path.
  * @param [in] sLeft Left path.
  * @param [in] bReadOnly Will path be recorded read-only?
@@ -256,14 +203,6 @@ String ProjectFileItem::GetMiddle(bool * pReadOnly /*= nullptr*/) const
 }
 
 /** 
- * @brief Returns if middle path is specified read-only.
- */
-bool ProjectFileItem::GetMiddleReadOnly() const
-{
-       return m_bMiddleReadOnly;
-}
-
-/** 
  * @brief Set middle path, returns old middle path.
  * @param [in] sMiddle Middle path.
  * @param [in] bReadOnly Will path be recorded read-only?
@@ -290,15 +229,6 @@ String ProjectFileItem::GetRight(bool * pReadOnly /*= nullptr*/) const
 }
 
 /** 
- * @brief Returns if right path is specified read-only.
- * @return true if right path is read-only, false otherwise.
- */
-bool ProjectFileItem::GetRightReadOnly() const
-{
-       return m_bRightReadOnly;
-}
-
-/** 
  * @brief Set right path, returns old right path.
  * @param [in] sRight Right path.
  * @param [in] bReadOnly Will path be recorded read-only?
@@ -311,54 +241,6 @@ void ProjectFileItem::SetRight(const String& sRight, const bool * pReadOnly /*=
 }
 
 /** 
- * @brief Returns filter.
- * @return Filter string.
- */
-String ProjectFileItem::GetFilter() const
-{
-       return m_filter;
-}
-
-/** 
- * @brief Set filter.
- * @param [in] sFilter New filter string to set.
- */
-void ProjectFileItem::SetFilter(const String& sFilter)
-{
-       m_filter = sFilter;
-}
-
-/** 
- * @brief Returns subfolder included -setting.
- * @return != 0 if subfolders are included.
- */
-int ProjectFileItem::GetSubfolders() const
-{
-       return m_subfolders;
-}
-
-/** 
- * @brief set subfolder.
- * @param [in] iSubfolder New value for subfolder inclusion.
- */
-void ProjectFileItem::SetSubfolders(bool bSubfolder)
-{
-       m_subfolders = bSubfolder ? 1 : 0;
-}
-
-/** 
- * @brief 
- *
- * @param [in] files Files in project
- * @param [in] bSubFolders If true subfolders included (recursive compare)
- */
-void ProjectFileItem::SetPaths(const PathContext& files, bool bSubfolders)
-{
-       m_paths = files;
-       m_subfolders = bSubfolders;
-}
-
-/** 
  * @brief Returns left and right paths and recursive from project file
  * 
  * @param [out] files Files in project
index 73b5b15..dcdac1a 100755 (executable)
@@ -86,3 +86,122 @@ public:
 private:
        std::list<ProjectFileItem> m_items;
 };
+
+/** 
+ * @brief Returns if left path is defined in project file.
+ * @return true if project file has left path.
+ */
+inline bool ProjectFileItem::HasLeft() const
+{
+       return m_bHasLeft;
+}
+
+/** 
+ * @brief Returns if middle path is defined.
+ */
+inline bool ProjectFileItem::HasMiddle() const
+{
+       return m_bHasMiddle;
+}
+
+/** 
+ * @brief Returns if right path is defined in project file.
+ * @return true if project file has right path.
+ */
+inline bool ProjectFileItem::HasRight() const
+{
+       return m_bHasRight;
+}
+
+/** 
+ * @brief Returns if filter is defined in project file.
+ * @return true if project file has filter.
+ */
+inline bool ProjectFileItem::HasFilter() const
+{
+       return m_bHasFilter;
+}
+
+/** 
+ * @brief Returns if subfolder is defined in projectfile.
+ * @return true if project file has subfolder definition.
+ */
+inline bool ProjectFileItem::HasSubfolders() const
+{
+       return m_bHasSubfolders;
+}
+
+/** 
+ * @brief Returns if left path is specified read-only.
+ * @return true if left path is read-only, false otherwise.
+ */
+inline bool ProjectFileItem::GetLeftReadOnly() const
+{
+       return m_bLeftReadOnly;
+}
+
+/** 
+ * @brief Returns if middle path is specified read-only.
+ */
+inline bool ProjectFileItem::GetMiddleReadOnly() const
+{
+       return m_bMiddleReadOnly;
+}
+
+/** 
+ * @brief Returns if right path is specified read-only.
+ * @return true if right path is read-only, false otherwise.
+ */
+inline bool ProjectFileItem::GetRightReadOnly() const
+{
+       return m_bRightReadOnly;
+}
+
+/** 
+ * @brief Returns filter.
+ * @return Filter string.
+ */
+inline String ProjectFileItem::GetFilter() const
+{
+       return m_filter;
+}
+
+/** 
+ * @brief Set filter.
+ * @param [in] sFilter New filter string to set.
+ */
+inline void ProjectFileItem::SetFilter(const String& sFilter)
+{
+       m_filter = sFilter;
+}
+
+/** 
+ * @brief Returns subfolder included -setting.
+ * @return != 0 if subfolders are included.
+ */
+inline int ProjectFileItem::GetSubfolders() const
+{
+       return m_subfolders;
+}
+
+/** 
+ * @brief set subfolder.
+ * @param [in] iSubfolder New value for subfolder inclusion.
+ */
+inline void ProjectFileItem::SetSubfolders(bool bSubfolder)
+{
+       m_subfolders = bSubfolder ? 1 : 0;
+}
+
+/** 
+ * @brief 
+ *
+ * @param [in] files Files in project
+ * @param [in] bSubFolders If true subfolders included (recursive compare)
+ */
+inline void ProjectFileItem::SetPaths(const PathContext& files, bool bSubfolders)
+{
+       m_paths = files;
+       m_subfolders = bSubfolders;
+}
+