Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
P
pykd-ext
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Todd Hartman
pykd-ext
Commits
58e5b625
Commit
58e5b625
authored
Oct 02, 2018
by
ussrhero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug #3
parent
5eb3a61c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
19 deletions
+27
-19
sources/arglist.cpp
sources/arglist.cpp
+27
-19
No files found.
sources/arglist.cpp
View file @
58e5b625
...
...
@@ -38,19 +38,16 @@ Options::Options(const std::string& cmdline) :
showHelp
(
false
),
runModule
(
false
)
{
args
=
getArgsList
(
cmdline
);
if
(
args
.
empty
()
)
{
global
=
true
;
}
bool
globalByDefault
=
true
;
for
(
auto
it
=
args
.
begin
();
it
!=
args
.
end
();)
{
if
(
*
it
==
"--global"
||
*
it
==
"-g"
)
{
global
=
true
;
globalByDefault
=
false
;
it
=
args
.
erase
(
it
);
continue
;
}
...
...
@@ -58,20 +55,7 @@ Options::Options(const std::string& cmdline) :
if
(
*
it
==
"--local"
||
*
it
==
"-l"
)
{
global
=
false
;
it
=
args
.
erase
(
it
);
continue
;
}
if
(
*
it
==
"--help"
||
*
it
==
"-h"
)
{
showHelp
=
true
;
it
=
args
.
erase
(
it
);
continue
;
}
if
(
*
it
==
"--module"
||
*
it
==
"-m"
)
{
runModule
=
true
;
globalByDefault
=
false
;
it
=
args
.
erase
(
it
);
continue
;
}
...
...
@@ -93,6 +77,30 @@ Options::Options(const std::string& cmdline) :
break
;
}
if
(
args
.
empty
()
&&
globalByDefault
)
{
global
=
true
;
}
for
(
auto
it
=
args
.
begin
();
it
!=
args
.
end
();)
{
if
(
*
it
==
"--help"
||
*
it
==
"-h"
)
{
showHelp
=
true
;
it
=
args
.
erase
(
it
);
continue
;
}
if
(
*
it
==
"--module"
||
*
it
==
"-m"
)
{
runModule
=
true
;
it
=
args
.
erase
(
it
);
continue
;
}
break
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment