Conversation
src/node.cc
Outdated
| cmd_args->argument_data += char(0x0); | ||
| } | ||
| cmd_args->argc = cmd_args->argument_pointer.size(); | ||
| cmd_args->argv = cmd_args->argument_pointer.data(); |
There was a problem hiding this comment.
Can we move this into a member function (constructor?) of the CmdArgs class?
There was a problem hiding this comment.
Good point!
|
another Todo: test uv args. |
|
It seems like a function |
What else did you/we expect? |
src/node.cc
Outdated
| int argc; | ||
| char** argv; | ||
| std::string argument_data; | ||
| std::vector<char*> argument_pointers; |
There was a problem hiding this comment.
These two don't need to be public.
src/node.cc
Outdated
| struct CmdArgs { | ||
| /** | ||
| * @brief CmdArgs builds a continuous adjacent char buffer (argv) from a vector of strings | ||
| * and stores it in the static cmd_args variable |
There was a problem hiding this comment.
Technically, it's not really a "static" variable, is it? Looks like a simple member variable to me.
There was a problem hiding this comment.
right, I fixed the documentation
It would be cool if you could call it as func("foo", "bar") instead of with curly braces, but it seems like this is only possible with real variadic functions or recursive templates (which would be hard to maintain in this case). |
Working:
Closes #22.