[X2Go-Commits] [nx-libs] 01/06: nxcomp/src/Log.h: use initializer lists instead of initializing member variables in-block.
git-admin at x2go.org
git-admin at x2go.org
Mon Dec 25 02:25:42 CET 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x-rpm-debug
in repository nx-libs.
commit 6e831f2bf64a4e902f6a778aa47b67660d78bf1f
Author: Mihai Moldovan <ionic at ionic.de>
Date: Sun Dec 24 20:07:44 2017 +0100
nxcomp/src/Log.h: use initializer lists instead of initializing member variables in-block.
---
nxcomp/src/Log.h | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/nxcomp/src/Log.h b/nxcomp/src/Log.h
index 3e355a9..66d4d14 100644
--- a/nxcomp/src/Log.h
+++ b/nxcomp/src/Log.h
@@ -105,12 +105,8 @@ class NXLogStamp
}
- NXLogStamp(const char *file, const char *function, int line, NXLogLevel level)
+ NXLogStamp(const char *file, const char *function, int line, NXLogLevel level) : file_(file), function_(function), line_(line), level_(level)
{
- file_ = std::string(file);
- function_ = std::string(function);
- line_ = line;
- level_ = level;
gettimeofday(×tamp_, NULL);
}
@@ -273,18 +269,9 @@ class NXLog
public:
- NXLog()
- {
- stream_ = &std::cerr;
- level_ = NXWARNING;
- synchronized_ = true;
- thread_buffer_size_ = 1024;
- log_level_ = false;
- log_time_ = false;
- log_unix_time_ = false;
- log_location_ = false;
- log_thread_id_ = false;
-
+ NXLog() : stream_(&std::cerr), level_(NXWARNING), synchronized_(true), thread_buffer_size_(1024),
+ log_level_(false), log_time_(false), log_unix_time_(false), log_location_(false), log_thread_id_(false)
+ {
if ( pthread_key_create(&tls_key_, free_thread_data) != 0 )
{
std::cerr << "pthread_key_create failed" << std::endl;
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list