Skip to content

Commit

Permalink
StrVec => StrVec2
Browse files Browse the repository at this point in the history
  • Loading branch information
kjk committed May 22, 2024
1 parent d796e47 commit 93b3814
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ExternalViewers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ bool ViewWithExternalViewer(WindowTab* tab, size_t idx) {
return false;
}

StrVec args;
StrVec2 args;
ParseCmdLine(ToWStrTemp(ev->commandLine), args);
int nArgs = args.Size();
if (nArgs == 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/plugin-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ WCHAR* GetSumatraExePath() {
}

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int nCmdShow) {
StrVec argList;
StrVec2 argList;
ParseCmdLine(GetCommandLine(), argList);

if (argList.Size() == 1) {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/signfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void ShowUsage(const char* exeName) {
}

int main() {
StrVec args;
StrVec2 args;
ParseCmdLine(GetCommandLineW(), args);

const char* filePath = nullptr;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/CmdLineArgsIter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ TempStr QuoteCmdLineArgTemp(char* arg) {
return res.StealData();
}

void ParseCmdLine(const WCHAR* cmdLine, StrVec& argsOut) {
void ParseCmdLine(const WCHAR* cmdLine, StrVec2& argsOut) {
int nArgs;
WCHAR** argsArr = CommandLineToArgvW(cmdLine, &nArgs);
for (int i = 0; i < nArgs; i++) {
Expand Down
4 changes: 2 additions & 2 deletions src/utils/CmdLineArgsIter.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

bool CouldBeArg(const char*);

void ParseCmdLine(const WCHAR* cmdLine, StrVec& argsOut);
void ParseCmdLine(const WCHAR* cmdLine, StrVec2& argsOut);
TempStr QuoteCmdLineArgTemp(char* arg);

struct CmdLineArgsIter {
StrVec args;
StrVec2 args;
int curr = 1; // first argument is exe path, which we skip
int nArgs = 0;
const char* currArg = nullptr;
Expand Down

0 comments on commit 93b3814

Please sign in to comment.