Commit ef78682f authored by msobczak's avatar msobczak

Style (pedantic).

parent 0df68ea5
......@@ -64,7 +64,7 @@ public:
{
// Fetch next row from dataset
if (!st_->fetch())
if (st_->fetch() == false)
{
// Set iterator to non-derefencable state (pass-the-end)
st_ = 0;
......@@ -90,7 +90,7 @@ public:
bool operator!=(rowset_iterator const& rhs) const
{
return (!(*this == rhs));
return ((*this == rhs) == false);
}
private:
......
......@@ -131,7 +131,7 @@ void statement_impl::exchange_for_row(into_type_ptr const &i)
void statement_impl::exchange_for_rowset(into_type_ptr const &i)
{
if (!intos_.empty())
if (intos_.empty() == false)
{
throw soci_error("Explicit into elements not allowed with rowset.");
}
......
......@@ -250,7 +250,7 @@ public:
: standard_use_type(&s, eXStatement, ind, false, name) {}
// Note: there is no const version of use for statement,
// because most likely it would not make much sense anyway.
// because most likely it would not make much sense anyway.
};
} // namespace details
......
......@@ -32,7 +32,7 @@ class PhonebookEntry3
public:
void setName(std::string const & n) { name_ = n; }
std::string getName() const { return name_; }
void setPhone(std::string const & p) { phone_ = p; }
std::string getPhone() const { return phone_; }
......@@ -305,7 +305,7 @@ void test1()
{
msg = e.what();
}
assert(!msg.empty());
assert(msg.empty() == false);
sql << "insert into soci_test (id) values (" << 123 << ")";
int id;
......@@ -976,7 +976,7 @@ void test4()
assert(st.fetch());
assert(ind == eOK);
assert(val == 12);
assert(!st.fetch());
assert(st.fetch() == false);
}
{
std::vector<int> vals(3);
......@@ -999,7 +999,7 @@ void test4()
assert(inds[0] == eNull);
assert(inds[1] == eOK);
assert(vals[1] == 12);
assert(!st.fetch());
assert(st.fetch() == false);
}
// additional test for "no data" condition
......@@ -1010,7 +1010,7 @@ void test4()
statement st = (sql.prepare <<
"select val from soci_test where 0 = 1", into(vals, inds));
assert(!st.execute(true));
assert(st.execute(true) == false);
// for convenience, vectors should be truncated
assert(vals.empty());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment