aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-13 17:55:50 +0000
committerDavid Robillard <d@drobilla.net>2013-01-13 17:55:50 +0000
commit9b5da6b16fb7dacada67db377beaa46a61fe0c22 (patch)
treecacb72d6e1d6aff44ac5f4967617a3281dad053b /src/engine
parent0cb9e2ad982390136a25dda96c88cd6cb40785f3 (diff)
downloadmachina-9b5da6b16fb7dacada67db377beaa46a61fe0c22.tar.gz
machina-9b5da6b16fb7dacada67db377beaa46a61fe0c22.tar.bz2
machina-9b5da6b16fb7dacada67db377beaa46a61fe0c22.zip
Lint.
git-svn-id: http://svn.drobilla.net/lad/trunk/machina@4960 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/Action.hpp3
-rw-r--r--src/engine/Problem.hpp7
-rw-r--r--src/engine/Slave.hpp8
-rw-r--r--src/engine/Stateful.hpp7
-rw-r--r--src/engine/machina/Controller.hpp3
-rw-r--r--src/engine/machina/Machine.hpp2
-rw-r--r--src/engine/machina/types.hpp6
7 files changed, 21 insertions, 15 deletions
diff --git a/src/engine/Action.hpp b/src/engine/Action.hpp
index 1dc13fc..0201380 100644
--- a/src/engine/Action.hpp
+++ b/src/engine/Action.hpp
@@ -43,8 +43,7 @@ struct Action
class PrintAction : public Action
{
public:
- PrintAction(const std::string& msg)
- : _msg(msg) {}
+ explicit PrintAction(const std::string& msg) : _msg(msg) {}
void execute(MIDISink* sink, Raul::TimeStamp time)
{ std::cout << "t=" << time << ": " << _msg << std::endl; }
diff --git a/src/engine/Problem.hpp b/src/engine/Problem.hpp
index 6e5c69b..ced3675 100644
--- a/src/engine/Problem.hpp
+++ b/src/engine/Problem.hpp
@@ -84,7 +84,12 @@ private:
};*/
struct Evaluator : public Raul::MIDISink {
- Evaluator(const Problem& problem) : _problem(problem), _order(4), _n_notes(0), _first_note(0) {
+ explicit Evaluator(const Problem& problem)
+ : _problem(problem)
+ , _order(4)
+ , _n_notes(0)
+ , _first_note(0)
+ {
for (uint8_t i=0; i < 128; ++i)
_counts[i] = 0;
}
diff --git a/src/engine/Slave.hpp b/src/engine/Slave.hpp
index e08fb71..55701a7 100644
--- a/src/engine/Slave.hpp
+++ b/src/engine/Slave.hpp
@@ -27,12 +27,14 @@ namespace machina {
* Use this to perform some task in a separate thread you want to 'drive'
* from a realtime (or otherwise) thread.
*/
-class Slave
- : public Raul::Thread
+class Slave : public Raul::Thread
{
public:
Slave() : _whip(0) {}
- ~Slave() { _exit_flag = true; _whip.post(); }
+ ~Slave() {
+ _exit_flag = true;
+ _whip.post();
+ }
virtual void join() {
_exit_flag = true;
diff --git a/src/engine/Stateful.hpp b/src/engine/Stateful.hpp
index 4294221..6657aff 100644
--- a/src/engine/Stateful.hpp
+++ b/src/engine/Stateful.hpp
@@ -47,7 +47,7 @@ public:
static uint64_t next_id() { return _next_id++; }
protected:
- Stateful(uint64_t id) : _id(id) {}
+ explicit Stateful(uint64_t id) : _id(id) {}
private:
static uint64_t _next_id;
@@ -56,11 +56,10 @@ private:
mutable Sord::Node _rdf_id;
};
-class StatefulKey
- : public Stateful
+class StatefulKey : public Stateful
{
public:
- StatefulKey(uint64_t id) : Stateful(id) {}
+ explicit StatefulKey(uint64_t id) : Stateful(id) {}
void write_state(Sord::Model& model) {}
};
diff --git a/src/engine/machina/Controller.hpp b/src/engine/machina/Controller.hpp
index 56ac93b..7738f22 100644
--- a/src/engine/machina/Controller.hpp
+++ b/src/engine/machina/Controller.hpp
@@ -40,7 +40,8 @@ class Machine;
class Stateful;
namespace client {
-class ClientModel; class ClientObject;
+class ClientModel;
+class ClientObject;
}
class Controller
diff --git a/src/engine/machina/Machine.hpp b/src/engine/machina/Machine.hpp
index a068f02..a4d0262 100644
--- a/src/engine/machina/Machine.hpp
+++ b/src/engine/machina/Machine.hpp
@@ -41,7 +41,7 @@ class Machine
: public Stateful
{
public:
- Machine(TimeUnit unit);
+ explicit Machine(TimeUnit unit);
/** Copy a Machine.
*
diff --git a/src/engine/machina/types.hpp b/src/engine/machina/types.hpp
index 632e138..38cd29c 100644
--- a/src/engine/machina/types.hpp
+++ b/src/engine/machina/types.hpp
@@ -36,17 +36,17 @@ using WPtr = std::weak_ptr<T>;
template <class T>
void NullDeleter(T* ptr) {}
-template<class T, class U>
+template<class T, class U>
SPtr<T> static_ptr_cast(const SPtr<U>& r) {
return std::static_pointer_cast<T>(r);
}
-template<class T, class U>
+template<class T, class U>
SPtr<T> dynamic_ptr_cast(const SPtr<U>& r) {
return std::dynamic_pointer_cast<T>(r);
}
-template<class T, class U>
+template<class T, class U>
SPtr<T> const_ptr_cast(const SPtr<U>& r) {
return std::const_pointer_cast<T>(r);
}