URL:
  <http://gna.org/patch/?6280>

                 Summary: Replace string16 use with utf8_str use in canvas.c
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Sat 22 Aug 2015 08:24:33 PM EEST
                Category: client-sdl2
                Priority: 5 - Normal
                  Status: Ready For Test
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.6.0, 3.0.0

    _______________________________________________________

Details:

Instead of stupidly direct conversion from string16 to ut8_str, refactored
things a bit in the process:

- Call the string size function only once and not separately to get the width,
and the height
- Assert that at least one of width or height is requested (this could be
early exit instead, if there's a valid case to call it for nothing)
- Made utf8_str_size() to get pointer to the output as a parameter, and made
return value 'void', so there's no copying of extra stuff to make the 'return
by struct value'.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 22 Aug 2015 08:24:34 PM EEST  Name: CanvasUTF8.patch  Size: 8kB  
By: cazfi

<http://gna.org/patch/download.php?file_id=24962>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?6280>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to