summaryrefslogtreecommitdiff
path: root/src/components/utils/src/system.cc
diff options
context:
space:
mode:
authorKozoriz <kozorizandriy@gmail.com>2016-04-26 12:41:54 +0300
committerKozoriz <kozorizandriy@gmail.com>2016-04-26 15:50:21 +0300
commit4ecdb2a83871784f34430ed09d5ef6a2c0855506 (patch)
treedc36b449e5d32ac3e493e16865cf9d88d9991817 /src/components/utils/src/system.cc
parentcf58bb97d09c536dce3b492d1517da0b837bc8eb (diff)
downloadsdl_core-4ecdb2a83871784f34430ed09d5ef6a2c0855506.tar.gz
Format all code in project
Formated all code in appMain, components, plugins to correct coding-style Used clang-format-3.6 Used 2 commands : find src/appMain/ -name "*.h" -o -name "*.cc" -o -name "*.hpp" -o -name "*.cpp" | xargs clang-format-3.6 -i -style=file find src/components/ -name "*.h" -o -name "*.cc" -o -name "*.hpp" -o -name "*.cpp" | xargs clang-format-3.6 -i -style=file find src/plugins/ -name "*.h" -o -name "*.cc" -o -name "*.hpp" -o -name "*.cpp" | xargs clang-format-3.6 -i -style=file
Diffstat (limited to 'src/components/utils/src/system.cc')
-rw-r--r--src/components/utils/src/system.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/components/utils/src/system.cc b/src/components/utils/src/system.cc
index 70659419a7..6c3cf56133 100644
--- a/src/components/utils/src/system.cc
+++ b/src/components/utils/src/system.cc
@@ -30,13 +30,13 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifdef __QNX__
-# include <process.h>
+#include <process.h>
#else // __QNX__
-# include <sys/types.h>
-# include <sys/wait.h>
-# include <sys/stat.h>
-# include <fcntl.h>
-# include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
#endif // __QNX__
#include <algorithm>
@@ -52,13 +52,12 @@ namespace utils {
CREATE_LOGGERPTR_LOCAL(logger_, "Utils")
struct GetCString {
- char * operator ()(const std::string& string) {
+ char* operator()(const std::string& string) {
return const_cast<char*>(string.c_str());
}
};
-System::System(const std::string& command)
- : command_(command) {
+System::System(const std::string& command) : command_(command) {
argv_.push_back(command);
}
@@ -88,7 +87,7 @@ bool System::Execute() {
bool System::Execute(bool wait) {
size_t size = argv_.size();
- char * *argv = new char*[size + 1];
+ char** argv = new char* [size + 1];
std::transform(argv_.begin(), argv_.end(), argv, GetCString());
argv[size] = NULL;
@@ -97,8 +96,9 @@ bool System::Execute(bool wait) {
delete[] argv;
if (ret == -1) {
- LOG4CXX_ERROR(logger_, "Can't execute command: " << command_
- << " Errno is: " << std::strerror(errno));
+ LOG4CXX_ERROR(logger_,
+ "Can't execute command: " << command_ << " Errno is: "
+ << std::strerror(errno));
return false;
}
@@ -137,7 +137,7 @@ bool System::Execute(bool wait) {
dup2(fd_dev0, STDERR_FILENO);
size_t size = argv_.size();
- char * *argv = new char*[size + 1];
+ char** argv = new char* [size + 1];
std::transform(argv_.begin(), argv_.end(), argv, GetCString());
argv[size] = NULL;