OSDN Git Service

Cleanup PLUGIN_MODE usage
authorGreyMerlin <greymerlin7@gmail.com>
Thu, 25 Oct 2018 00:46:30 +0000 (17:46 -0700)
committerGreyMerlin <greymerlin7@gmail.com>
Sun, 28 Oct 2018 15:00:29 +0000 (08:00 -0700)
commit1ea8a8e398a9c2e482fc696b371a8b17e7e51774
treed5190d7b63d3bf988365ecfd1b2ac29ab4bc0506
parent6e2db299afee650ce66128f2d3a93af6aec9c4d2
Cleanup PLUGIN_MODE usage

While modernizing more NULL and BOOL situations, I encountered the following two comments in the
code ...
`// TODO: Convert to PLUGIN_MODE and fix compile error` and
`// TODO: Convert bMode to PLUGIN_MODE and fix compile errors`

* Values of type `PLUGIN_MODE` were being stored into `int` variables, often with a `b` prefix
(implying the variables were boolean in nature).
* And values themselves were sometimes `false`, or `1` although sometimes from the `PLUGIN_MODE`
enumeration.
* Value testing often assumed the values were boolean (i.e. zero or non-zero)

* I've changed all appropriate variables to type `PLUGIN_MODE` and used explicit values from the
enumeration in all related expressions.
* I've also taken the opportunity to modernize all member variables in the `PluginForFile` and
`PackingInfo` classes, by adding an explicit `m_` prefix
17 files changed:
Src/DiffTextBuffer.cpp
Src/DiffWrapper.cpp
Src/DirActions.h
Src/FileTransform.cpp
Src/FileTransform.h
Src/FolderCmp.cpp
Src/MainFrm.cpp
Src/Merge.cpp
Src/Merge7zFormatMergePluginImpl.cpp
Src/MergeDoc.cpp
Src/MergeEditView.cpp
Src/OpenView.cpp
Src/PluginManager.cpp
Src/PluginManager.h
Src/SelectUnpackerDlg.cpp
Testing/Data/Office/excel.xls
Testing/GoogleTest/Plugins/Plugins_test.cpp