From: Alberto Gonzalez Date: Fri, 27 Mar 2020 16:44:05 +0000 (+0000) Subject: Clean up manual casting. X-Git-Tag: working-ls180~641^2~13 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09b2264837bf0a2d7d2c9b35f88c2d5924fa4364;p=yosys.git Clean up manual casting. Co-Authored-By: David Shah --- diff --git a/passes/sat/qbfsat.cc b/passes/sat/qbfsat.cc index d249c7dde..4c3e24505 100644 --- a/passes/sat/qbfsat.cc +++ b/passes/sat/qbfsat.cc @@ -137,7 +137,7 @@ void specialize_from_file(RTLIL::Module *module, const std::string &file) { RTLIL::Wire *wire = module->wire(hole_name); #ifndef NDEBUG log_assert(wire != nullptr); - log_assert(wire->width > 0 && hole_value.size() == static_cast(wire->width)); + log_assert(wire->width > 0 && GetSize(hole_value) == wire->width); #endif log("Specializing %s from file with %s = %d'b%s.\n", module->name.c_str(), hole_name.c_str(), wire->width, hole_value.c_str()); @@ -165,7 +165,7 @@ void specialize(RTLIL::Module *module, const QbfSolutionType &sol) { RTLIL::Wire *wire = module->wire(hole_name); #ifndef NDEBUG log_assert(wire != nullptr); - log_assert(wire->width > 0 && hole_value.size() == static_cast(wire->width)); + log_assert(wire->width > 0 && GetSize(hole_value) == wire->width); #endif log("Specializing %s with %s = %d'b%s.\n", module->name.c_str(), hole_name.c_str(), wire->width, hole_value.c_str());