Skip to content
Snippets Groups Projects
Commit c647b19e authored by Adrien Béraud's avatar Adrien Béraud
Browse files

infohash: make some methods constexpr, noexcept

parent 8cd14646
Branches
Tags
No related merge requests found
......@@ -65,7 +65,7 @@ public:
typedef typename T::iterator iterator;
typedef typename T::const_iterator const_iterator;
Hash () {
Hash () noexcept {
data_.fill(0);
}
Hash (const uint8_t* h, size_t data_len) {
......@@ -85,7 +85,7 @@ public:
msgpack_unpack(o);
}
size_t size() const { return data_.size(); }
constexpr size_t size() const noexcept { return data_.size(); }
const uint8_t* data() const { return data_.data(); }
uint8_t* data() { return data_.data(); }
iterator begin() { return data_.begin(); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment