[Orxonox-commit 6336] r10993 - in code/branches/cpp11_v2/src/libraries: core/command core/object util/output
landauf at orxonox.net
landauf at orxonox.net
Tue Dec 29 17:18:23 CET 2015
Author: landauf
Date: 2015-12-29 17:18:23 +0100 (Tue, 29 Dec 2015)
New Revision: 10993
Modified:
code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc
code/branches/cpp11_v2/src/libraries/core/object/Listable.cc
code/branches/cpp11_v2/src/libraries/util/output/OutputStream.cc
Log:
using constructor delegation
Modified: code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc 2015-12-29 16:16:28 UTC (rev 10992)
+++ code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc 2015-12-29 16:18:23 UTC (rev 10993)
@@ -49,8 +49,8 @@
@param bInitialized If true, the executor is used for both, the definition of the function-header AND to executute the command. If false, the command is inactive and needs to be assigned a function before it can be used.
*/
ConsoleCommand::ConsoleCommand(const std::string& name, const ExecutorPtr& executor, bool bInitialized)
+ : ConsoleCommand("", name, executor, bInitialized)
{
- this->init("", name, executor, bInitialized);
}
/**
Modified: code/branches/cpp11_v2/src/libraries/core/object/Listable.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/core/object/Listable.cc 2015-12-29 16:16:28 UTC (rev 10992)
+++ code/branches/cpp11_v2/src/libraries/core/object/Listable.cc 2015-12-29 16:18:23 UTC (rev 10993)
@@ -43,12 +43,8 @@
/**
@brief Constructor: Allocates space in the element list.
*/
- Listable::Listable()
+ Listable::Listable() : Listable(Context::getRootContext())
{
- this->context_ = Context::getRootContext();
- this->elements_.reserve(6);
-
- RegisterObject(Listable);
}
/**
Modified: code/branches/cpp11_v2/src/libraries/util/output/OutputStream.cc
===================================================================
--- code/branches/cpp11_v2/src/libraries/util/output/OutputStream.cc 2015-12-29 16:16:28 UTC (rev 10992)
+++ code/branches/cpp11_v2/src/libraries/util/output/OutputStream.cc 2015-12-29 16:18:23 UTC (rev 10993)
@@ -40,9 +40,8 @@
/**
@brief Default constructor, initializes level and context with default values.
*/
- OutputStream::OutputStream()
+ OutputStream::OutputStream() : OutputStream(level::debug_output, context::undefined())
{
- this->setOutputAttributes(level::debug_output, context::undefined());
}
/**
More information about the Orxonox-commit
mailing list