mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-12 13:59:46 -04:00
DWARFS_ASSERT -> DWARFS_CHECK
This commit is contained in:
parent
1d39c4b50f
commit
9cd9deb45b
@ -77,7 +77,7 @@ class system_error : public boost::system::system_error {
|
|||||||
|
|
||||||
#define DWARFS_THROW(cls, ...) throw cls(__VA_ARGS__, __FILE__, __LINE__)
|
#define DWARFS_THROW(cls, ...) throw cls(__VA_ARGS__, __FILE__, __LINE__)
|
||||||
|
|
||||||
#define DWARFS_ASSERT(expr, message) \
|
#define DWARFS_CHECK(expr, message) \
|
||||||
do { \
|
do { \
|
||||||
if (!(expr)) { \
|
if (!(expr)) { \
|
||||||
assertion_failed(#expr, message, __FILE__, __LINE__); \
|
assertion_failed(#expr, message, __FILE__, __LINE__); \
|
||||||
|
@ -132,7 +132,7 @@ class block_request {
|
|||||||
: begin_(begin)
|
: begin_(begin)
|
||||||
, end_(end)
|
, end_(end)
|
||||||
, promise_(std::move(promise)) {
|
, promise_(std::move(promise)) {
|
||||||
DWARFS_ASSERT(begin_ < end_, "invalid block_request");
|
DWARFS_CHECK(begin_ < end_, "invalid block_request");
|
||||||
}
|
}
|
||||||
|
|
||||||
block_request(block_request&&) = default;
|
block_request(block_request&&) = default;
|
||||||
|
@ -346,7 +346,7 @@ scanner_<LoggerPolicy>::scan_tree(const std::string& path, progress& prog) {
|
|||||||
while (!queue.empty()) {
|
while (!queue.empty()) {
|
||||||
auto parent = std::dynamic_pointer_cast<dir>(queue.front());
|
auto parent = std::dynamic_pointer_cast<dir>(queue.front());
|
||||||
|
|
||||||
DWARFS_ASSERT(parent, "expected directory");
|
DWARFS_CHECK(parent, "expected directory");
|
||||||
|
|
||||||
queue.pop_front();
|
queue.pop_front();
|
||||||
const std::string& path = parent->path();
|
const std::string& path = parent->path();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user