Code improvement

Closes #4085
pull/4084/merge
SinghRajenM 2018-01-15 00:19:16 +05:30 committed by Don HO
parent 440c9c57fe
commit fcb3ce31a0
3 changed files with 6 additions and 4 deletions

View File

@ -71,7 +71,7 @@ bool VerifySignedLibrary(const wstring& filepath,
// Initialise WinTrust data
WINTRUST_DATA winTEXTrust_data = { 0 };
winTEXTrust_data.cbStruct = sizeof(winTEXTrust_data);
winTEXTrust_data.dwUIChoice = WTD_UI_NONE; // do not display optionnal dialog boxes
winTEXTrust_data.dwUIChoice = WTD_UI_NONE; // do not display optional dialog boxes
winTEXTrust_data.dwUnionChoice = WTD_CHOICE_FILE; // we are not checking catalog signed files
winTEXTrust_data.dwStateAction = WTD_STATEACTION_VERIFY; // only checking
winTEXTrust_data.fdwRevocationChecks = WTD_REVOKE_WHOLECHAIN; // verify the whole certificate chain
@ -227,14 +227,14 @@ bool VerifySignedLibrary(const wstring& filepath,
}
display_name = display_name_buffer.get();
} catch (wstring s) {
} catch (const wstring& s) {
::MessageBox(NULL, s.c_str(), TEXT("DLL signature verification failed"), MB_ICONERROR);
OutputDebugString(TEXT("VerifyLibrary: error while getting certificate informations\n"));
status = false;
} catch (...) {
// Unknown error
OutputDebugString(TEXT("VerifyLibrary: error while getting certificate informations\n"));
wstring errMsg(TEXT("Unknown exception occured. "));
wstring errMsg(TEXT("Unknown exception occurred. "));
errMsg += GetLastErrorAsString(GetLastError());
::MessageBox(NULL, errMsg.c_str(), TEXT("DLL signature verification failed"), MB_ICONERROR);
status = false;

View File

@ -51,7 +51,7 @@ public:
private:
std::vector<MatchedCharInserted> _insertedMatchedChars;
ScintillaEditView * _pEditView;
ScintillaEditView * _pEditView = nullptr;;
};
class AutoCompletion {

View File

@ -342,6 +342,7 @@ void FunctionListPanel::reload()
for (size_t i = 0, len = _foundFuncInfos.size(); i < len; ++i)
{
// no 2 levels
/*
bool b = false;
if (b)
{
@ -355,6 +356,7 @@ void FunctionListPanel::reload()
addEntry(NULL, entryName.c_str(), _foundFuncInfos[i]._pos);
}
else
*/
{
addEntry(_foundFuncInfos[i]._data2.c_str(), _foundFuncInfos[i]._data.c_str(), _foundFuncInfos[i]._pos);
}