tint: Fix x86 build

Change-Id: Idb2002dd59cf12e49f75af6174e08258b4331137
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/95840
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/tint/writer/text_generator.cc b/src/tint/writer/text_generator.cc
index 1a1fa5a..3dabb5c 100644
--- a/src/tint/writer/text_generator.cc
+++ b/src/tint/writer/text_generator.cc
@@ -84,12 +84,13 @@
                             << "  lines.size(): " << lines.size();
         return;
     }
-    lines.insert(lines.begin() + static_cast<int64_t>(before), Line{indent, line});
+    using DT = decltype(lines)::difference_type;
+    lines.insert(lines.begin() + static_cast<DT>(before), Line{indent, line});
 }
 
 void TextGenerator::TextBuffer::Append(const TextBuffer& tb) {
     for (auto& line : tb.lines) {
-        // TODO(bclayton): inefficent, consider optimizing
+        // TODO(bclayton): inefficient, consider optimizing
         lines.emplace_back(Line{current_indent + line.indent, line.content});
     }
 }
@@ -104,8 +105,9 @@
     }
     size_t idx = 0;
     for (auto& line : tb.lines) {
-        // TODO(bclayton): inefficent, consider optimizing
-        lines.insert(lines.begin() + static_cast<int64_t>(before + idx),
+        // TODO(bclayton): inefficient, consider optimizing
+        using DT = decltype(lines)::difference_type;
+        lines.insert(lines.begin() + static_cast<DT>(before + idx),
                      Line{indent + line.indent, line.content});
         idx++;
     }