libs/mrgui/examples/main.cc

 

warning: implicit conversion 'SDL_Window *' -> 'bool'

[readability-implicit-bool-conversion]

libs/mrgui/examples/main.cc 80 : 10

   80 |     if (!window) {
      |         ~^     
      |                 == nullptr
 

warning: invalid case style for local pointer 'glContext'

[readability-identifier-naming]

libs/mrgui/examples/main.cc 85 : 11

   85 |     auto* glContext = SDL_GL_CreateContext(window);
      |           ^~~~~~~~~
      |           gl_context
   86 |     SDL_GetWindowSize(window, &window_width, &window_height);
   87 |     if (!glContext) {
      |          ~~~~~~~~~
      |          gl_context

warning: implicit conversion 'void *' -> 'bool'

[readability-implicit-bool-conversion]

libs/mrgui/examples/main.cc 87 : 10

   87 |     if (!glContext) {
      |         ~^        
      |                    == nullptr
 

warning: variable 'idstack' of type 'IdStack' can be declared 'const'

[misc-const-correctness]

libs/mrgui/examples/main.cc 116 : 5

  116 |     IdStack idstack;
      |     ^
      |             const 

warning: variable 'c' of type 'char' can be declared 'const'

[misc-const-correctness]

libs/mrgui/examples/main.cc 165 : 17

  165 |                 char c = e.text.text[0];
      |                 ^
      |                      const 
   

warning: statement should be inside braces

[google-readability-braces-around-statements,readability-braces-around-statements]

libs/mrgui/examples/main.cc 166 : 39

  166 |                 if ((c & 0xFF80) == 0)
      |                                       ^
      |                                        {
  167 |                     uistate.keychar = static_cast<char>(c & 0x7f);
      |                                                                   

warning: variable 'cmd' of type 'eu::render:: RenderCommand' can be declared 'const'

[misc-const-correctness]

libs/mrgui/examples/main.cc 179 : 13

  179 |             eu::render::RenderCommand cmd {.states = &states, .render = &render, .size = {.width = window_width, .height = window_height} };
      |             ^
      |                                       const