Skip to content

Commit

Permalink
Merge pull request #37 from mrylov/master
Browse files Browse the repository at this point in the history
Resolve some compiler warnings
  • Loading branch information
stefanuhrig authored Jun 13, 2022
2 parents 9f85aa6 + 9d6f74d commit fc2033a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/odbc/Exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ODBC_EXPORT Exception : public std::exception
*
* @return Returns a description of the error that occurred.
*/
virtual const char* what() const noexcept;
const char* what() const noexcept override;

private:
std::string msg_;
Expand Down
6 changes: 3 additions & 3 deletions src/odbc/RefCounted.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Reference
/**
* Constructs a NULL reference.
*/
Reference() : ptr_(0) {}
Reference() : ptr_(nullptr) {}

/**
* Constructs a reference to a given reference-counted object.
Expand Down Expand Up @@ -133,7 +133,7 @@ class Reference
* @return Returns true if this reference manages an object, false
* otherwise.
*/
bool isNull() const { return ptr_ == 0; }
bool isNull() const { return ptr_ == nullptr; }

/**
* Returns a reference to the managed object.
Expand Down Expand Up @@ -183,7 +183,7 @@ class Reference
* Decreases the reference-count of the managed object and does not
* reference it anymore.
*/
void reset() { reset_(0); }
void reset() { reset_(nullptr); }

/**
* Releases the currently managed object and manages a new object.
Expand Down
2 changes: 1 addition & 1 deletion src/odbc/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class ODBC_EXPORT decimal
*
* @return Returns the unscaled value of this decimal number.
*/
const char* unscaledValue() const { return value_.c_str(); };
const char* unscaledValue() const { return value_.c_str(); }

/**
* Returns a string representation of this number.
Expand Down

0 comments on commit fc2033a

Please sign in to comment.