diff --git a/lib/core/include/qx/core/qx-abstracterror.h b/lib/core/include/qx/core/qx-abstracterror.h index c01c763c..38317467 100644 --- a/lib/core/include/qx/core/qx-abstracterror.h +++ b/lib/core/include/qx/core/qx-abstracterror.h @@ -105,7 +105,7 @@ friend class Error; public: bool operator==(const AbstractError& other) const = default; bool operator!=(const AbstractError& other) const = default; - operator bool() const { return deriveValue() > 0; }; + explicit operator bool() const { return deriveValue() > 0; }; }; /* TODO: Get string of the type automatically when it becomes diff --git a/lib/core/include/qx/core/qx-error.h b/lib/core/include/qx/core/qx-error.h index 65b97e44..ac5268fc 100644 --- a/lib/core/include/qx/core/qx-error.h +++ b/lib/core/include/qx/core/qx-error.h @@ -114,7 +114,7 @@ class QX_CORE_EXPORT Error public: bool operator==(const Error& other) const = default; bool operator!=(const Error& other) const = default; - operator bool() const; + explicit operator bool() const; //-Friend Functions------------------------------------------------------------------------------------------------ friend QTextStream& ::operator<<(QTextStream& ts, const Error& e);