mirror of
https://github.com/silverqx/TinyORM.git
synced 2026-05-12 12:28:57 -05:00
added comments about explicit
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user