mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Replace utfcpp by UTF8.h in Textbox.cpp
This commit is contained in:
parent
736ce3ecbf
commit
8a011c3061
1 changed files with 2 additions and 2 deletions
|
@ -1,9 +1,9 @@
|
|||
#include "Textbox.h"
|
||||
|
||||
#include <SDL.h>
|
||||
#include <utf8/unchecked.h>
|
||||
|
||||
#include "Font.h"
|
||||
#include "UTF8.h"
|
||||
|
||||
textboxclass::textboxclass(void)
|
||||
{
|
||||
|
@ -145,7 +145,7 @@ void textboxclass::padtowidth(size_t new_w)
|
|||
size_t chars_w = SDL_max(w-16, new_w) / glyph_w;
|
||||
for (size_t iter = 0; iter < lines.size(); iter++)
|
||||
{
|
||||
size_t n_glyphs = utf8::unchecked::distance(lines[iter].begin(), lines[iter].end());
|
||||
size_t n_glyphs = UTF8_total_codepoints(lines[iter].c_str());
|
||||
signed int padding_needed = chars_w - n_glyphs;
|
||||
if (padding_needed < 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue