Browse Source

Merge pull request #51 from AkiraMiyakoda/msvc_warning

Fix an MSVC warning about narrowing conversion.
master
Nemanja Trifunovic 5 years ago
committed by GitHub
parent
commit
c3f9261eb8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      samples/docsample.cpp

2
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

Loading…
Cancel
Save