Skip to content

Commit

Permalink
Remove error::success (API Change)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinniefalco committed May 2, 2017
1 parent 5a307e4 commit 5290618
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,6 +1,7 @@
1.0.2

* Better CMakeLists.txt for finding Boost
* Remove error::success (API Change)

---

Expand Down
3 changes: 2 additions & 1 deletion include/nudb/detail/format.hpp
Expand Up @@ -398,7 +398,8 @@ write(File& f, key_file_header const& kh, error_code& ec)
ec = error::invalid_block_size;
return;
}
std::fill(buf.get(), buf.get() + buf.size(), 0);
std::fill(buf.get(), buf.get() + buf.size(),
(unsigned char)0);
ostream os{buf.get(), buf.size()};
write(os, kh);
f.write(0, buf.get(), buf.size(), ec);
Expand Down
6 changes: 0 additions & 6 deletions include/nudb/error.hpp
Expand Up @@ -81,12 +81,6 @@ namespace errc = boost::system::errc;
/// Database error codes.
enum class error
{
/** No error.
The operation completed successfully.
*/
success = 0,

/** The specified key was not found.
Returned when @ref basic_store::fetch does not
Expand Down
7 changes: 1 addition & 6 deletions include/nudb/impl/error.ipp
Expand Up @@ -27,9 +27,7 @@ nudb_category()
{
switch(static_cast<error>(ev))
{
case error::success:
return "the operation completed successfully";

default:
case error::key_not_found:
return "key not found";

Expand Down Expand Up @@ -146,9 +144,6 @@ nudb_category()

case error::duplicate_value:
return "duplicate value";

default:
return "nudb error";
}
}

Expand Down
1 change: 0 additions & 1 deletion test/error.cpp
Expand Up @@ -33,7 +33,6 @@ class error_test : public beast::unit_test::suite
{
nudb_category().message(0);
nudb_category().message(99999);
check("nudb", error::success);
check("nudb", error::key_not_found);
check("nudb", error::key_exists);
check("nudb", error::short_read);
Expand Down

0 comments on commit 5290618

Please sign in to comment.