From 7fb1211306d9c6ec03f7fced00b406ac7d9da0b6 Mon Sep 17 00:00:00 2001 From: Akira Miyakoda Date: Thu, 17 Oct 2019 23:45:42 +0900 Subject: [PATCH] Fix an MSVC warning about narrowing conversion. --- samples/docsample.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/docsample.cpp b/samples/docsample.cpp index a758d73..6533887 100644 --- a/samples/docsample.cpp +++ b/samples/docsample.cpp @@ -36,7 +36,7 @@ int main(int argc, char** argv) cout << "This part is fine: " << string(line.begin(), end_it) << "\n"; } // Get the line length (at least for the valid part) - int length = utf8::distance(line.begin(), end_it); + ptrdiff_t length = utf8::distance(line.begin(), end_it); cout << "Length of line " << line_count << " is " << length << "\n"; // Convert it to utf-16