Skip to content

Commit

Permalink
Fix a regression regarding b859303
Browse files Browse the repository at this point in the history
  • Loading branch information
donho committed Jul 27, 2017
1 parent 385746d commit afb3889
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion PowerEditor/src/Notepad_plus.cpp
Expand Up @@ -5248,7 +5248,8 @@ void Notepad_plus::notifyBufferActivated(BufferID bufid, int view)
_linkTriggered = true;
}

void Notepad_plus::loadCommandlineParams(const TCHAR * commandLine, CmdLineParams * pCmdParams) {
void Notepad_plus::loadCommandlineParams(const TCHAR * commandLine, CmdLineParams * pCmdParams)
{
if (!commandLine || ! pCmdParams)
return;

Expand Down
10 changes: 5 additions & 5 deletions PowerEditor/src/winmain.cpp
Expand Up @@ -30,7 +30,7 @@
#include "Win32Exception.h" //Win32 exception
#include "MiniDumper.h" //Write dump files

typedef std::vector<const TCHAR*> ParamVector;
typedef std::vector<generic_string> ParamVector;


namespace
Expand Down Expand Up @@ -190,7 +190,7 @@ bool isInList(const TCHAR *token2Find, ParamVector & params)

for (size_t i = 0; i < nbItems; ++i)
{
if (!lstrcmp(token2Find, params.at(i)))
if (!lstrcmp(token2Find, params.at(i).c_str()))
{
params.erase(params.begin() + i);
return true;
Expand All @@ -206,7 +206,7 @@ bool getParamVal(TCHAR c, ParamVector & params, generic_string & value)

for (size_t i = 0; i < nbItems; ++i)
{
const TCHAR * token = params.at(i);
const TCHAR * token = params.at(i).c_str();
if (token[0] == '-' && lstrlen(token) >= 2 && token[1] == c) { //dash, and enough chars
value = (token+2);
params.erase(params.begin() + i);
Expand All @@ -223,7 +223,7 @@ bool getParamValFromString(const TCHAR *str, ParamVector & params, generic_strin

for (size_t i = 0; i < nbItems; ++i)
{
const TCHAR * token = params.at(i);
const TCHAR * token = params.at(i).c_str();
generic_string tokenStr = token;
size_t pos = tokenStr.find(str);
if (pos != generic_string::npos && pos == 0)
Expand Down Expand Up @@ -409,7 +409,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)

for (size_t i = 0; i < nbFilesToOpen; ++i)
{
const TCHAR * currentFile = params.at(i);
const TCHAR * currentFile = params.at(i).c_str();
if (currentFile[0])
{
//check if relative or full path. Relative paths dont have a colon for driveletter
Expand Down

0 comments on commit afb3889

Please sign in to comment.