Commit Graph
9 Commits
Author SHA1 Message Date
Gleb Mazovetskiy 8c1a847f41 Remove utils/stdcompat/string_view.hpp 2023-08-14 09:59:14 +01:00
Gleb Mazovetskiy 4fa3732526 Add missing <cstdint> includes
Done with the following script:

```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
  v = File.read(path)
  next if !v.include?("uint32_t") || v.include?("cstdint")

  lines = v.lines
  line_num = if lines[2].start_with?(" *")
    lines.index { |l| l.start_with?(" */") } + 3
  else
    3
  end

  lines.insert(line_num, "#include <cstdint>\n")

  File.write(path, lines.join(""))
end
```

then fixed-up manually
2023-05-10 13:50:12 +01:00
Andrew James 60b835214b Address warnings in Utf8 functions (#4748)
* Use explicit typecasts to force signed char comparisons

Avoids warnings about tautological comparisons (either the >= 0 comparison for ARM/PowerPC or the <= 127 comparison for x86*)

* Remove unused function
2022-06-19 13:32:22 +02:00
Gleb Mazovetskiy f22d1d0149 Remove uses of deprecated codecvt
codecvt is deprecated in C++17 and we don't really need all of its heavy
machinery for simply converting to UTF-8.
2022-06-16 13:54:29 +01:00
staphen 421a7772b4 Fix error that produces broken character at end of UTF8 string 2022-06-09 11:10:34 +02:00
ephphatha 93068de918 Address type conversion warnings in WordWrapString 2022-04-03 14:56:01 +02:00
Anders Jenbo 799f1763af Performce UTF8 aware limited string copies 2021-11-22 03:28:51 +01:00
ephphatha c206b7cce8 Return Utf8DecodeError when passed an incomplete code point
Also ensure that len set in all code paths, otherwise it leads to a call to remove_prefix with garbage.
2021-11-21 12:33:57 +00:00
Gleb Mazovetskiy e9a9daa794 DrawString: Stop allocating
Switch to a state-machine UTF-8 decoder from the branchless one.
This allows us to avoid copying the string on every `DrawString` call.
2021-11-07 04:17:50 +01:00