Skip to content

Commit

Permalink
dealt with clang-tidy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
katemonster33 committed Mar 24, 2024
1 parent 27f1bde commit 80dff06
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/cata_imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,17 @@ struct GlyphToDraw {
ImU32 col;
};

std::vector<GlyphToDraw> glyphsToDraw;
static std::vector<GlyphToDraw> glyphsToDraw;
struct CataImFont : public ImFont {
std::unordered_map<ImU32, unsigned char> sdlColorsToCata;
const cataimgui::client &imclient;
const std::unique_ptr<Font> &cata_font;
CataImFont( const cataimgui::client &imclient, const std::unique_ptr<Font> &cata_font ) : ImFont(),
CataImFont( const cataimgui::client &imclient, const std::unique_ptr<Font> &cata_font ) :
imclient( imclient ), cata_font( cata_font ) {
}

void OutputChars() {
for( GlyphToDraw glyphToDraw : glyphsToDraw ) {
for( const GlyphToDraw &glyphToDraw : glyphsToDraw ) {

std::string uni_string = std::string( glyphToDraw.uni_str );
point p( int( glyphToDraw.pos.x - 3 ), int( glyphToDraw.pos.y - 5 ) );
Expand All @@ -201,10 +201,10 @@ struct CataImFont : public ImFont {

int GetFallbackCharWidth( const char *s_begin, const char *s_end,
const float scale ) const override {
return cata_font->width * utf8_width( std::string( s_begin, s_end ) );;
return cata_font->width * utf8_width( std::string( s_begin, s_end ) ) * int( scale );
}
};
CataImFont *activeFont;
static CataImFont *activeFont;

cataimgui::client::client( const SDL_Renderer_Ptr &sdl_renderer, const SDL_Window_Ptr &sdl_window,
const GeometryRenderer_Ptr &sdl_geometry ) :
Expand Down

0 comments on commit 80dff06

Please sign in to comment.