mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Make constructors explicit
This commit is contained in:
@@ -50,7 +50,7 @@ public:
|
||||
*
|
||||
* \param doc The Documentation whose identifier was previously registered
|
||||
*/
|
||||
DuplicateDocumentationException(Documentation doc);
|
||||
explicit DuplicateDocumentationException(Documentation doc);
|
||||
|
||||
/// The offending Documentation whose identifier was previously registered
|
||||
Documentation documentation;
|
||||
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
*/
|
||||
class StringVerifier : public TemplateVerifier<std::string> {
|
||||
public:
|
||||
StringVerifier(bool mustBeNotEmpty = false);
|
||||
explicit StringVerifier(bool mustBeNotEmpty = false);
|
||||
|
||||
TestResult operator()(const ghoul::Dictionary& dictionary,
|
||||
const std::string& key) const override;
|
||||
@@ -256,7 +256,7 @@ public:
|
||||
* \param nEntries The exact number of entries that should be in the table. If the
|
||||
* value is not provided, any number (including 0) is allowed
|
||||
*/
|
||||
TableVerifier(std::vector<DocumentationEntry> documentationEntries = {},
|
||||
explicit TableVerifier(std::vector<DocumentationEntry> documentationEntries = {},
|
||||
std::optional<int> nEntries = std::nullopt);
|
||||
|
||||
/**
|
||||
@@ -293,7 +293,7 @@ public:
|
||||
*
|
||||
* \param elementDocumentation The documentation for each string in the list
|
||||
*/
|
||||
StringListVerifier(std::string elementDocumentation = "");
|
||||
explicit StringListVerifier(std::string elementDocumentation = "");
|
||||
|
||||
std::string type() const override;
|
||||
};
|
||||
@@ -308,7 +308,7 @@ public:
|
||||
*
|
||||
* \param elementDocumentation The documentation for each string in the list
|
||||
*/
|
||||
IntListVerifier(std::string elementDocumentation = "");
|
||||
explicit IntListVerifier(std::string elementDocumentation = "");
|
||||
|
||||
std::string type() const override;
|
||||
};
|
||||
@@ -367,7 +367,7 @@ public:
|
||||
template <typename T>
|
||||
class Vector2ListVerifier : public TableVerifier {
|
||||
public:
|
||||
Vector2ListVerifier(std::string elementDocumentation = "")
|
||||
explicit Vector2ListVerifier(std::string elementDocumentation = "")
|
||||
: TableVerifier({
|
||||
{
|
||||
"*",
|
||||
@@ -391,7 +391,7 @@ public:
|
||||
template <typename T>
|
||||
class Vector3ListVerifier : public TableVerifier {
|
||||
public:
|
||||
Vector3ListVerifier(std::string elementDocumentation = "")
|
||||
explicit Vector3ListVerifier(std::string elementDocumentation = "")
|
||||
: TableVerifier({
|
||||
{
|
||||
"*",
|
||||
@@ -415,7 +415,7 @@ public:
|
||||
template <typename T>
|
||||
class Vector4ListVerifier : public TableVerifier {
|
||||
public:
|
||||
Vector4ListVerifier(std::string elementDocumentation = "")
|
||||
explicit Vector4ListVerifier(std::string elementDocumentation = "")
|
||||
: TableVerifier({
|
||||
{
|
||||
"*",
|
||||
@@ -546,7 +546,7 @@ public:
|
||||
* \param value The value against which the tested value is compared using the
|
||||
* `Operator`
|
||||
*/
|
||||
OperatorVerifier(typename T::Type value);
|
||||
explicit OperatorVerifier(typename T::Type value);
|
||||
|
||||
/**
|
||||
* First checks whether the \p dictionary contains the passed \p key and whether the
|
||||
@@ -700,7 +700,7 @@ public:
|
||||
*
|
||||
* \param values The list of values against which the incoming value is tested
|
||||
*/
|
||||
InListVerifier(std::vector<typename T::Type> values);
|
||||
explicit InListVerifier(std::vector<typename T::Type> values);
|
||||
|
||||
/**
|
||||
* Tests whether the \p key exists in the \p dictionary, whether it has the correct
|
||||
@@ -742,7 +742,7 @@ public:
|
||||
*
|
||||
* \param values The list of values against which the incoming value is tested
|
||||
*/
|
||||
NotInListVerifier(std::vector<typename T::Type> values);
|
||||
explicit NotInListVerifier(std::vector<typename T::Type> values);
|
||||
|
||||
/**
|
||||
* Tests whether the \p key exists in the \p dictionary, whether it has the correct
|
||||
@@ -897,7 +897,7 @@ public:
|
||||
*
|
||||
* \pre annotation must not be empty
|
||||
*/
|
||||
AnnotationVerifier(std::string annotation);
|
||||
explicit AnnotationVerifier(std::string annotation);
|
||||
|
||||
std::string documentation() const override;
|
||||
|
||||
@@ -923,7 +923,7 @@ public:
|
||||
*
|
||||
* \param identifier The identifier of the Documentation that this Verifier references
|
||||
*/
|
||||
ReferencingVerifier(std::string identifier);
|
||||
explicit ReferencingVerifier(std::string identifier);
|
||||
|
||||
/**
|
||||
* Checks whether the \p key in the \p dictionary exists and is of type Table (similar
|
||||
@@ -975,7 +975,7 @@ public:
|
||||
* the entire ownership model of the documentation/verifiers. For now it was
|
||||
* necessary to make the codegen work in all cases without complications there
|
||||
*/
|
||||
OrVerifier(const std::vector<std::variant<Verifier*,
|
||||
explicit OrVerifier(const std::vector<std::variant<Verifier*,
|
||||
std::shared_ptr<Verifier>>>& values);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user