int nIgnoreWhitespace = 0;
if (m_settings.ignoreAllSpace)
- nIgnoreWhitespace = 2;
+ nIgnoreWhitespace = WHITESPACE_IGNORE_ALL;
else if (m_settings.ignoreSpaceChange)
- nIgnoreWhitespace = 1;
+ nIgnoreWhitespace = WHITESPACE_IGNORE_CHANGE;
options->nIgnoreWhitespace = nIgnoreWhitespace;
options->bIgnoreBlankLines = m_settings.ignoreBlankLines;
*/
void CDiffWrapper::InternalSetOptions(DIFFOPTIONS *options)
{
- m_settings.ignoreAllSpace = (options->nIgnoreWhitespace == 2);
- m_settings.ignoreSpaceChange = (options->nIgnoreWhitespace == 1);
+ m_settings.ignoreAllSpace = (options->nIgnoreWhitespace == WHITESPACE_IGNORE_ALL);
+ m_settings.ignoreSpaceChange = (options->nIgnoreWhitespace == WHITESPACE_IGNORE_CHANGE);
m_settings.ignoreBlankLines = options->bIgnoreBlankLines;
m_settings.ignoreEOLDiff = !options->bEolSensitive;
m_settings.ignoreCase = options->bIgnoreCase;
- m_settings.ignoreSomeChanges = (options->nIgnoreWhitespace != 0) ||
+ m_settings.ignoreSomeChanges = (options->nIgnoreWhitespace != WHITESPACE_COMPARE_ALL) ||
options->bIgnoreCase || options->bIgnoreBlankLines ||
!options->bEolSensitive;
- m_settings.lengthVaries = (options->nIgnoreWhitespace!=0);
+ m_settings.lengthVaries = (options->nIgnoreWhitespace != WHITESPACE_COMPARE_ALL);
}
/**
};
/**
+ * @brief Whitespace options
+ *
+ * DIFFOPTIONS structs nIgnoreWhitespace can have these values
+ */
+enum
+{
+ WHITESPACE_COMPARE_ALL = 0,
+ WHITESPACE_IGNORE_CHANGE,
+ WHITESPACE_IGNORE_ALL
+};
+
+/**
* @brief One difference defined by linenumbers.
*
* This struct defines one set of different lines "diff".
2003-09-07 Kimmo
PATCH: [ 800420 ] Fix recursive compare and cleanup recursive usage
WinMerge: DiffThread.h DiffThread.cpp DirDoc.h DirDoc.cpp MainFrm.cpp
+ Use constant values for whitespace compare setting
+ WinMerge: DiffWrapper.h DiffWrapper.cpp
2003-09-06 Perry
PATCH: [ 795082 ] Display Private Build version in about box