diff options
author | Cristian Maglie <c.maglie@bug.st> | 2013-06-12 13:20:25 +0200 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2013-06-12 13:20:25 +0200 |
commit | 8674a1b9e9da542b729d660d8f996f0e58008dbd (patch) | |
tree | 7c30a0d84394d927dbf92be5c46197e263633b82 /libraries/Bridge/Process.cpp | |
parent | 8b6a72f3b56dec9441ba1a1b151dc58a05dafa57 (diff) |
Refactored String methods and constructor on Process class.
Diffstat (limited to 'libraries/Bridge/Process.cpp')
-rw-r--r-- | libraries/Bridge/Process.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/libraries/Bridge/Process.cpp b/libraries/Bridge/Process.cpp index 6b86d54..78f168f 100644 --- a/libraries/Bridge/Process.cpp +++ b/libraries/Bridge/Process.cpp @@ -66,22 +66,12 @@ void Process::doBuffer() { buffered = bridge.transfer(cmd, 3, buffer, sizeof(buffer)); } -void Process::begin(String &command) { +void Process::begin(const String &command) { close(); cmdline = new String(command); } -void Process::begin(const char *command) { - close(); - cmdline = new String(command); -} - -void Process::addParameter(const char *param) { - *cmdline += "\xFE"; - *cmdline += param; -} - -void Process::addParameter(String ¶m) { +void Process::addParameter(const String ¶m) { *cmdline += "\xFE"; *cmdline += param; } |