aboutsummaryrefslogtreecommitdiffstats
path: root/TODO
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-04-23 22:03:02 +0200
committerJay Berkenbilt <ejb@ql.org>2022-04-24 00:25:43 +0200
commit5bbb0d4c307bff58e9928a1c757438d033687ce3 (patch)
tree3b9baa1845f9eefc42748039c053dcfbe5f80e62 /TODO
parent37f05e67d87518a26ab7f50da8c39d9c9a0570db (diff)
downloadqpdf-5bbb0d4c307bff58e9928a1c757438d033687ce3.tar.zst
Replace switch statements with static map initializers
Character transcoding from Unicode to single-byte characters used hard-coded switch statements because the code predated our adoption of C++11. Now we have thread-safe, static initialization of map literals, so use that instead.
Diffstat (limited to 'TODO')
-rw-r--r--TODO10
1 files changed, 3 insertions, 7 deletions
diff --git a/TODO b/TODO
index 956d1ef3..1cbf977f 100644
--- a/TODO
+++ b/TODO
@@ -11,9 +11,6 @@ In order:
Other (do in any order):
Misc
-* Get rid of "ugly switch statements" in QUtil.cc -- replace with
- static map initializers. (Search for "ugly switch statements" below
- as well.)
* Consider exposing get_next_utf8_codepoint in QUtil
* Add QUtil::is_explicit_utf8 that does what QPDF_String::getUTF8Val
does to detect UTF-8 encoded strings per PDF 2.0 spec.
@@ -396,10 +393,9 @@ we might do about it.
* When mapping characters to widths, we will need to care about
character encoding. For built-in fonts, we can create a map from
Unicode code point to width and then go from the font's encoding to
- unicode to the width. Get rid of "ugly switch statements" in
- QUtil.cc and replace with static map initializers. See
- misc/character-encoding/ (not on github) and font metric information
- for the 14 standard fonts in my local pdf-spec directory.
+ unicode to the width. See misc/character-encoding/ (not on github)
+ and font metric information for the 14 standard fonts in my local
+ pdf-spec directory.
* Once we know about character widths, we can correctly support
auto-sized variable text fields (0 Tf). If this is fixed, search for