added comments about explicit

This commit is contained in:
silverqx
2024-09-15 18:13:14 +02:00
parent e7e6716110
commit cae3c43c2b
3 changed files with 3 additions and 3 deletions
@@ -38,7 +38,7 @@ namespace Orm::Drivers
using enum RequiredStatus;
/*! Constructor. */
explicit SqlField(QString fieldName = {}, QMetaType metaType = {},
explicit SqlField(QString fieldName = {}, QMetaType metaType = {}, // explicit is needed as still can act as converting constructor if only the fieldName is passed
QString tableName = {});
/*! Default destructor. */
~SqlField() = default;
@@ -20,7 +20,7 @@ namespace Orm::Drivers::Support
/*! Determine if a SqlRecord is cached. */
constexpr bool has() const noexcept;
/*! Determine if a SqlRecord is cached. */
constexpr explicit operator bool() const noexcept;
constexpr explicit operator bool() const noexcept; // explicit is always desirable with the operator bool() to avoid unintentional conversions
/*! Retrieve a SqlRecord from the cache. */
constexpr SqlRecord &get();
@@ -25,7 +25,7 @@ namespace Grammars
public:
/*! Constructor. */
inline explicit MySqlSchemaGrammar(bool isMaria = false);
inline explicit MySqlSchemaGrammar(bool isMaria = false); // explicit is needed as still can act as converting constructor if the isMaria is passed
/*! Virtual destructor. */
~MySqlSchemaGrammar() override = default;