Skip to content

Commit

Permalink
Partially turn off clang-format for in cpp/gui/shapes headers
Browse files Browse the repository at this point in the history
We ensure that glutils.h is included prior to gl_core_3_3.h since it
indirectly includes Qt's OpenGL headers (which breaks the build).
  • Loading branch information
daljit46 committed Oct 30, 2024
1 parent 99b27e6 commit 9972548
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpp/gui/shapes/cube.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@

#pragma once

// glutils.h must be included before gl_core_3_3.h since it include Qt OpenGL headers
// which must be included before gl_core_3_3.h
// clang-format off
#include "opengl/glutils.h"
#include "opengl/gl_core_3_3.h"
// clang-format on

namespace MR::GUI::Shapes {

Expand Down
4 changes: 4 additions & 0 deletions cpp/gui/shapes/cylinder.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@

#pragma once

// glutils.h must be included before gl_core_3_3.h since it include Qt OpenGL headers
// which must be included before gl_core_3_3.h
// clang-format off
#include "opengl/glutils.h"
#include "opengl/gl_core_3_3.h"
// clang-format on

namespace MR::GUI::Shapes {

Expand Down
4 changes: 4 additions & 0 deletions cpp/gui/shapes/halfsphere.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@

#include "types.h"

// glutils.h must be included before gl_core_3_3.h since it include Qt OpenGL headers
// which must be included before gl_core_3_3.h
// clang-format off
#include "opengl/glutils.h"
#include "opengl/gl_core_3_3.h"
// clang-format on

namespace MR::GUI::Shapes {

Expand Down
4 changes: 4 additions & 0 deletions cpp/gui/shapes/sphere.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@

#include "types.h"

// glutils.h must be included before gl_core_3_3.h since it include Qt OpenGL headers
// which must be included before gl_core_3_3.h
// clang-format off
#include "opengl/glutils.h"
#include "opengl/gl_core_3_3.h"
// clang-format on

namespace MR::GUI::Shapes {

Expand Down

0 comments on commit 9972548

Please sign in to comment.