Clean up manual casting.
authorAlberto Gonzalez <boqwxp@airmail.cc>
Fri, 27 Mar 2020 16:44:05 +0000 (16:44 +0000)
committerAlberto Gonzalez <boqwxp@airmail.cc>
Sat, 4 Apr 2020 22:13:26 +0000 (22:13 +0000)
Co-Authored-By: David Shah <dave@ds0.me>
passes/sat/qbfsat.cc

index d249c7dde24fe8c2e441a9d10a790446bd39974f..4c3e245059a6bd588c3246aace22f8df1368da9b 100644 (file)
@@ -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<unsigned long>(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<unsigned long>(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());