Revert "Don't store args as std::string"
This reverts commit 8482575d1f
.
There is weird thing happened if we tried to store raw "argv" on Linux.
This commit is contained in:
parent
9f30933d3a
commit
d9c22396ea
4 changed files with 31 additions and 16 deletions
|
@ -6,15 +6,13 @@
|
|||
|
||||
namespace atom {
|
||||
|
||||
// static
|
||||
std::vector<const char*> AtomCommandLine::argv_;
|
||||
|
||||
// static
|
||||
void AtomCommandLine::Init(int argc, const char* argv[]) {
|
||||
argv_.reserve(argc);
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
argv_.push_back(argv[i]);
|
||||
void AtomCommandLine::Init(int argc,
|
||||
const char* const* argv) {
|
||||
for (int i = 0; i < argc; ++i) {
|
||||
argv_.push_back(argv[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> AtomCommandLine::argv_;
|
||||
|
||||
} // namespace atom
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue