]> gitweb.factorcode.org Git - factor.git/commitdiff
vm: Cast cell to int for some C++ functions.
authorDoug Coleman <doug.coleman@gmail.com>
Wed, 2 Dec 2020 22:38:25 +0000 (16:38 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Wed, 2 Dec 2020 22:38:25 +0000 (16:38 -0600)
vm/debug.cpp
vm/math.cpp

index da02aa5fadbf6bd8c1c9be76f0d13bc944fb5be9..4ffa5ac388947f6a9637a5c7ceedad4d04d90ebc 100644 (file)
@@ -267,7 +267,7 @@ void factor_vm::dump_memory(ostream& out, cell from, cell to) {
 
 void dump_memory_range(ostream& out, const char* name, cell name_w,
                        cell start, cell end) {
-  out << setw(name_w) << left << name << ": ";
+  out << setw(static_cast<int>(name_w)) << left << name << ": ";
 
   out << "[" << (void*)start << " -> " << (void*)end << "] ";
   out << setw(10) << right << (end - start) << " bytes" << endl;
index d78bf93c2ff1e681c2674facb343a9ca4fc0b25f..ef56d265dcf95eaae7962feafbc0ef8dd03a48e5 100644 (file)
@@ -238,10 +238,10 @@ void factor_vm::primitive_format_float() {
     localized_stream << std::setfill(fill[0]);
   }
   if (width >= 0) {
-    localized_stream << std::setw(width);
+    localized_stream << std::setw(static_cast<int>(width));
   }
   if (precision >= 0) {
-    localized_stream << std::setprecision(precision);
+    localized_stream << std::setprecision(static_cast<int>(precision));
   }
   localized_stream << value;
   const std::string& tmp = localized_stream.str();