OSDN Git Service

コンストラクターに explicit を付加
authorstarg <starg@users.osdn.me>
Fri, 12 Aug 2016 13:10:53 +0000 (22:10 +0900)
committerstarg <starg@users.osdn.me>
Fri, 12 Aug 2016 13:10:53 +0000 (22:10 +0900)
include/compiler/base.hpp
include/compiler/nested.hpp
include/ir2midi/ir2midi.hpp

index 4849346..044d68c 100644 (file)
@@ -22,7 +22,7 @@ public:
     CompilerBase() = default;
 
     template<typename T>
-    CompilerBase(T func) : m_Callback(func)
+    explicit CompilerBase(T func) : m_Callback(func)
     {
     }
 
index 4dbef9f..61c1c13 100644 (file)
@@ -12,7 +12,7 @@ namespace Compiler
 class NestedCompilerBase : public CompilerBase
 {
 public:
-    NestedCompilerBase(CompilerBase& parentCompiler)
+    explicit NestedCompilerBase(CompilerBase& parentCompiler)
         : CompilerBase([this] (auto&& x) { m_ParentCompiler.AddMessage(x); return true; }), m_ParentCompiler(parentCompiler)
     {
     }
index 5e05165..9ff4e4f 100644 (file)
@@ -42,7 +42,7 @@ private:
 class IR2MIDICompiler : public Compiler::CompilerBase, public boost::static_visitor<>
 {
 public:
-    IR2MIDICompiler(const IR::Module& ir);
+    explicit IR2MIDICompiler(const IR::Module& ir);
 
     bool Compile(const std::string& entryPoint);