提交 f4dcdc1f authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

make cppcheck happy

上级 d03a4c10
...@@ -101,8 +101,8 @@ ...@@ -101,8 +101,8 @@
class Logger class Logger
{ {
public: public:
static void Init(const std::string id, Channel::UnixStreamSocket* channel); static void Init(const std::string &id, Channel::UnixStreamSocket* channel);
static void Init(const std::string id); static void Init(const std::string &id);
public: public:
static std::string id; static std::string id;
......
...@@ -11,7 +11,7 @@ char Logger::buffer[MS_LOGGER_BUFFER_SIZE]; ...@@ -11,7 +11,7 @@ char Logger::buffer[MS_LOGGER_BUFFER_SIZE];
/* Class methods. */ /* Class methods. */
void Logger::Init(const std::string id, Channel::UnixStreamSocket* channel) void Logger::Init(const std::string &id, Channel::UnixStreamSocket* channel)
{ {
Logger::id = id; Logger::id = id;
Logger::channel = channel; Logger::channel = channel;
...@@ -19,7 +19,7 @@ void Logger::Init(const std::string id, Channel::UnixStreamSocket* channel) ...@@ -19,7 +19,7 @@ void Logger::Init(const std::string id, Channel::UnixStreamSocket* channel)
MS_TRACE(); MS_TRACE();
} }
void Logger::Init(const std::string id) void Logger::Init(const std::string &id)
{ {
Logger::id = id; Logger::id = id;
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "DepLibUV.hpp" #include "DepLibUV.hpp"
#include "DepOpenSSL.hpp" #include "DepOpenSSL.hpp"
#include "Utils.hpp" #include "Utils.hpp"
#include <string>
static void init(); static void init();
static void destroy(); static void destroy();
...@@ -17,8 +18,10 @@ int main(int argc, char* argv[]) ...@@ -17,8 +18,10 @@ int main(int argc, char* argv[])
Settings::configuration.logTags.rtp = true; Settings::configuration.logTags.rtp = true;
Settings::configuration.logTags.rtcp = true; Settings::configuration.logTags.rtcp = true;
std::string loggerId = "tests";
// Initialize the Logger. // Initialize the Logger.
Logger::Init("tests"); Logger::Init(loggerId);
init(); init();
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论