[Libreoffice-commits] online.git: loolwsd/LOOLBroker.cpp loolwsd/LOOLKit.cpp
Tor Lillqvist
tml at collabora.com
Tue Mar 1 13:46:03 UTC 2016
loolwsd/LOOLBroker.cpp | 14 ++++++++------
loolwsd/LOOLKit.cpp | 15 ++++++++-------
2 files changed, 16 insertions(+), 13 deletions(-)
New commits:
commit f8aad3d31fa430586078ec742c51ae79e88c5ac9
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Mar 1 15:44:22 2016 +0200
Use the std:: versions of C standard library functions
As mentioned in the coding style part of README.
diff --git a/loolwsd/LOOLBroker.cpp b/loolwsd/LOOLBroker.cpp
index c90f5fa..480c630 100644
--- a/loolwsd/LOOLBroker.cpp
+++ b/loolwsd/LOOLBroker.cpp
@@ -9,6 +9,8 @@
#include <sys/wait.h>
+#include <cstring>
+
#include "Common.hpp"
#include "Capabilities.hpp"
#include "Util.hpp"
@@ -655,37 +657,37 @@ int main(int argc, char** argv)
{
char *cmd = argv[i];
char *eq = nullptr;
- if (strstr(cmd, "--losubpath=") == cmd)
+ if (std::strstr(cmd, "--losubpath=") == cmd)
{
eq = strchrnul(cmd, '=');
if (*eq)
loSubPath = std::string(++eq);
}
- else if (strstr(cmd, "--systemplate=") == cmd)
+ else if (std::strstr(cmd, "--systemplate=") == cmd)
{
eq = strchrnul(cmd, '=');
if (*eq)
sysTemplate = std::string(++eq);
}
- else if (strstr(cmd, "--lotemplate=") == cmd)
+ else if (std::strstr(cmd, "--lotemplate=") == cmd)
{
eq = strchrnul(cmd, '=');
if (*eq)
loTemplate = std::string(++eq);
}
- else if (strstr(cmd, "--childroot=") == cmd)
+ else if (std::strstr(cmd, "--childroot=") == cmd)
{
eq = strchrnul(cmd, '=');
if (*eq)
childRoot = std::string(++eq);
}
- else if (strstr(cmd, "--numprespawns=") == cmd)
+ else if (std::strstr(cmd, "--numprespawns=") == cmd)
{
eq = strchrnul(cmd, '=');
if (*eq)
numPreSpawnedChildren = std::stoi(std::string(++eq));
}
- else if (strstr(cmd, "--clientport=") == cmd)
+ else if (std::strstr(cmd, "--clientport=") == cmd)
{
eq = strchrnul(cmd, '=');
if (*eq)
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 7dc7772..892139c 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -21,8 +21,9 @@
#include <dlfcn.h>
#include <atomic>
-#include <memory>
+#include <cstring>
#include <iostream>
+#include <memory>
#include <Poco/Net/WebSocket.h>
#include <Poco/Net/HTTPClientSession.h>
@@ -1085,37 +1086,37 @@ int main(int argc, char** argv)
char *cmd = argv[i];
char *eq = nullptr;
- if (strstr(cmd, "--childroot=") == cmd)
+ if (std::strstr(cmd, "--childroot=") == cmd)
{
eq = strchrnul(cmd, '=');
if (*eq)
childRoot = std::string(++eq);
}
- else if (strstr(cmd, "--systemplate=") == cmd)
+ else if (std::strstr(cmd, "--systemplate=") == cmd)
{
eq = strchrnul(cmd, '=');
if (*eq)
sysTemplate = std::string(++eq);
}
- else if (strstr(cmd, "--lotemplate=") == cmd)
+ else if (std::strstr(cmd, "--lotemplate=") == cmd)
{
eq = strchrnul(cmd, '=');
if (*eq)
loTemplate = std::string(++eq);
}
- else if (strstr(cmd, "--losubpath=") == cmd)
+ else if (std::strstr(cmd, "--losubpath=") == cmd)
{
eq = strchrnul(cmd, '=');
if (*eq)
loSubPath = std::string(++eq);
}
- else if (strstr(cmd, "--pipe=") == cmd)
+ else if (std::strstr(cmd, "--pipe=") == cmd)
{
eq = strchrnul(cmd, '=');
if (*eq)
pipe = std::string(++eq);
}
- else if (strstr(cmd, "--clientport=") == cmd)
+ else if (std::strstr(cmd, "--clientport=") == cmd)
{
eq = strchrnul(cmd, '=');
if (*eq)
More information about the Libreoffice-commits
mailing list