aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2018-02-15 22:45:13 +0100
committerRobin Krahl <me@robin-krahl.de>2018-02-15 22:45:13 +0100
commit42de7326c1aa2bcf621a83a8dbb0ac5c44bdc4fb (patch)
treec60987d2b10b241d158a19a2e67cc54476c05fbf
parent9d36dacdbfe9aed072ae4ea18231e9a4cdff2894 (diff)
downloadsqlitepp-42de7326c1aa2bcf621a83a8dbb0ac5c44bdc4fb.tar.gz
sqlitepp-42de7326c1aa2bcf621a83a8dbb0ac5c44bdc4fb.tar.bz2
Remove unnecessary consts from function declarations
-rw-r--r--include/sqlitepp/sqlitepp.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/sqlitepp/sqlitepp.h b/include/sqlitepp/sqlitepp.h
index f9ed097..f253876 100644
--- a/include/sqlitepp/sqlitepp.h
+++ b/include/sqlitepp/sqlitepp.h
@@ -162,7 +162,7 @@ class Openable {
/// \param open `true` if the objet should be open per default; `false` if
/// it shoukd be closed per defaut
/// \param name the name of the implementing class used in error messages
- Openable(const bool open, const std::string& name);
+ Openable(bool open, const std::string& name);
/// \brief Requires this object to be open and throws an exception if it is
/// not.
@@ -178,7 +178,7 @@ class Openable {
///
/// \param open the new state of this object (`true` if it should be opened;
/// `false` if it should be closed)
- void setOpen(const bool open);
+ void setOpen(bool open);
private:
bool m_open;
@@ -204,14 +204,14 @@ class DatabaseError : public std::runtime_error {
///
/// \param errorCode the SQLite3 error code
/// \sa [SQLite Result Codes](https://www.sqlite.org/c3ref/c_abort.html)
- explicit DatabaseError(const int errorCode);
+ explicit DatabaseError(int errorCode);
/// \brief Creates a new DatabaseError with the given code and message.
///
/// \param errorCode the SQLite3 error code
/// \param errorMessage the according error message
/// \sa [SQLite Result Codes](https://www.sqlite.org/c3ref/c_abort.html)
- DatabaseError(const int errorCode, const std::string& errorMessage);
+ DatabaseError(int errorCode, const std::string& errorMessage);
/// \brief Returns the SQLite3 error code for this error.
///
@@ -221,7 +221,7 @@ class DatabaseError : public std::runtime_error {
private:
const int m_errorCode;
- static std::string getErrorMessage(const int errorCode,
+ static std::string getErrorMessage(int errorCode,
const std::string& errorMessage);
};
@@ -252,7 +252,7 @@ class Statement : private Uncopyable, public Openable {
/// \throws std::runtime_error if there is not enough memory to bind the
/// value
/// \throws DatabaseError if an database error occured during the binding
- void bind(const int index, const double value);
+ void bind(int index, double value);
/// \brief Binds the given double value to the column with the given name.
///
@@ -263,7 +263,7 @@ class Statement : private Uncopyable, public Openable {
/// \throws std::runtime_error if there is not enough memory to bind the
/// value
/// \throws DatabaseError if an database error occured during the binding
- void bind(const std::string& name, const double value);
+ void bind(const std::string& name, double value);
/// \brief Binds the given integer value to the column with the given index.
///
@@ -274,7 +274,7 @@ class Statement : private Uncopyable, public Openable {
/// \throws std::runtime_error if there is not enough memory to bind the
/// value
/// \throws DatabaseError if an database error occured during the binding
- void bind(const int index, const int value);
+ void bind(int index, int value);
/// \brief Binds the given integer value to the column with the given name.
///
@@ -285,7 +285,7 @@ class Statement : private Uncopyable, public Openable {
/// \throws std::runtime_error if there is not enough memory to bind the
/// value
/// \throws DatabaseError if an database error occured during the binding
- void bind(const std::string& name, const int value);
+ void bind(const std::string& name, int value);
/// \brief Binds the given string value to the column with the given index.
///
@@ -296,7 +296,7 @@ class Statement : private Uncopyable, public Openable {
/// \throws std::runtime_error if there is not enough memory to bind the
/// value
/// \throws DatabaseError if an database error occured during the binding
- void bind(const int index, const std::string& value);
+ void bind(int index, const std::string& value);
/// \brief Binds the given string value to the column with the given name.
///
@@ -337,7 +337,7 @@ class Statement : private Uncopyable, public Openable {
explicit Statement(sqlite3_stmt* handle);
int getParameterIndex(const std::string& name) const;
- void handleBindResult(const int index, const int result) const;
+ void handleBindResult(int index, int result) const;
void requireCanRead() const;
void setInstancePointer(const std::weak_ptr<Statement>& instancePointer);
bool step();
@@ -483,7 +483,7 @@ class ResultSet {
/// \returns the current value of the result column with the given index
/// \throws std::logic_error if the statement is not open or there is no
/// data to read
- double readDouble(const int column) const;
+ double readDouble(int column) const;
/// \brief Returns the current integer value of the result column with the
/// given index.
@@ -494,7 +494,7 @@ class ResultSet {
/// \returns the current value of the result column with the given index
/// \throws std::logic_error if the statement is not open or there is no
/// data to read
- int readInt(const int column) const;
+ int readInt(int column) const;
/// \brief Returns the current string value of the result column with the
/// given index.
@@ -505,10 +505,10 @@ class ResultSet {
/// \returns the current value of the result column with the given index
/// \throws std::logic_error if the statement is not open or there is no
/// data to read
- std::string readString(const int column) const;
+ std::string readString(int column) const;
private:
- explicit ResultSet(const std::shared_ptr<Statement> statement);
+ explicit ResultSet(std::shared_ptr<Statement> statement);
const std::shared_ptr<Statement> m_statement;