]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgcobol: Use auto for container iterator types
authorJonathan Wakely <jwakely@redhat.com>
Tue, 18 Mar 2025 21:21:28 +0000 (21:21 +0000)
committerJames K. Lowden <jklowden@cobolworx.com>
Wed, 26 Mar 2025 20:49:11 +0000 (16:49 -0400)
libgcobol/ChangeLog:

* charmaps.cc (__gg__raw_to_ascii): Use auto for complicated
nested type.
(__gg__raw_to_ebcdic): Likewise.
(__gg__console_to_ascii): Likewise.
(__gg__console_to_ebcdic): Likewise.

libgcobol/charmaps.cc

index 6a7975030df02698e3e4c6fa8d1201922aab83e1..f990e0ff6984534ae894e72e8bd32984c47cdb3c 100644 (file)
@@ -439,8 +439,7 @@ __gg__raw_to_ascii(char **dest, size_t *dest_size, const char *in, size_t length
 
     // Check for that unicode code point in the subset of characters we
     // know about:
-    std::unordered_map<unsigned short, unsigned char>::const_iterator it =
-        utf8_to_cp1252_values.find(unicode_point);
+    auto it = utf8_to_cp1252_values.find(unicode_point);
     if( it == utf8_to_cp1252_values.end() )
         {
         // That unicode character isn't in our list
@@ -501,8 +500,7 @@ __gg__raw_to_ebcdic(char **dest, size_t *dest_size, const char *in, size_t lengt
                                                                 position );
         // Check for that unicode code point in the subset of characters we
         // know about:
-        std::unordered_map<unsigned short, unsigned char>::const_iterator it =
-            utf8_to_cp1252_values.find(unicode_point);
+        auto it = utf8_to_cp1252_values.find(unicode_point);
         if( it == utf8_to_cp1252_values.end() )
             {
             // That unicode character isn't in our list
@@ -769,8 +767,7 @@ void __gg__console_to_ascii(char * const str, size_t length)
             {
             // Check for that unicode code point in the subset of characters we
             // know about:
-            std::unordered_map<unsigned short, unsigned char>::const_iterator it
-                = utf8_to_cp1252_values.find(unicode_point);
+            auto it = utf8_to_cp1252_values.find(unicode_point);
             if( it == utf8_to_cp1252_values.end() )
                 {
                 // That unicode character isn't in our list
@@ -810,8 +807,7 @@ __gg__console_to_ebcdic(char * const str, size_t length)
             {
             // Check for that unicode code point in the subset of characters we
             // know about:
-            std::unordered_map<unsigned short, unsigned char>::const_iterator it
-                = utf8_to_cp1252_values.find(unicode_point);
+            auto it = utf8_to_cp1252_values.find(unicode_point);
             if( it == utf8_to_cp1252_values.end() )
                 {
                 // That unicode character isn't in our list