aboutsummaryrefslogtreecommitdiffstats
path: root/gui/fpgaviewwidget.h
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-06-23 16:06:49 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-06-23 16:06:49 +0200
commit4b78ae15dfbcdb197cfe4a8e27cdae6e4005c292 (patch)
treed95e8367c2e3ed2f8cb35f21ad1252c76bf5587b /gui/fpgaviewwidget.h
parentc0b1078c12b80d9add270eec560bd7cdc433d4da (diff)
downloadnextpnr-4b78ae15dfbcdb197cfe4a8e27cdae6e4005c292.tar.gz
nextpnr-4b78ae15dfbcdb197cfe4a8e27cdae6e4005c292.tar.bz2
nextpnr-4b78ae15dfbcdb197cfe4a8e27cdae6e4005c292.zip
clangformat cleanup
Diffstat (limited to 'gui/fpgaviewwidget.h')
-rw-r--r--gui/fpgaviewwidget.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/gui/fpgaviewwidget.h b/gui/fpgaviewwidget.h
index 9f9dc024..980571fd 100644
--- a/gui/fpgaviewwidget.h
+++ b/gui/fpgaviewwidget.h
@@ -51,15 +51,8 @@ struct ColorPOD
GLfloat b;
GLfloat a;
- ColorPOD(GLfloat R, GLfloat G, GLfloat B, GLfloat A)
- : r(R), g(G), b(B), a(A)
- {
- }
- ColorPOD(const QColor &color)
- : r(color.redF()), g(color.greenF()), b(color.blueF()),
- a(color.alphaF())
- {
- }
+ ColorPOD(GLfloat R, GLfloat G, GLfloat B, GLfloat A) : r(R), g(G), b(B), a(A) {}
+ ColorPOD(const QColor &color) : r(color.redF()), g(color.greenF()), b(color.blueF()), a(color.alphaF()) {}
} __attribute__((packed));
// LineShaderData is a built set of vertices that can be rendered by the
@@ -75,10 +68,7 @@ struct LineShaderData
GLfloat thickness;
ColorPOD color;
- LineShaderData(GLfloat Thickness, QColor Color)
- : thickness(Thickness), color(Color)
- {
- }
+ LineShaderData(GLfloat Thickness, QColor Color) : thickness(Thickness), color(Color) {}
};
// PolyLine is a set of segments defined by points, that can be built to a
@@ -89,8 +79,7 @@ class PolyLine
std::vector<QVector2D> points_;
bool closed_;
- void buildPoint(LineShaderData *building, const QVector2D *prev,
- const QVector2D *cur, const QVector2D *next) const;
+ void buildPoint(LineShaderData *building, const QVector2D *prev, const QVector2D *cur, const QVector2D *next) const;
public:
// Create an empty PolyLine.
@@ -212,11 +201,10 @@ class LineShader
" gl_Position = projection * vec4(p, 0.0, 1.0);\n"
"}\n";
- static constexpr const char *fragmentShaderSource_ =
- "uniform lowp vec4 color;\n"
- "void main() {\n"
- " gl_FragColor = color;\n"
- "}\n";
+ static constexpr const char *fragmentShaderSource_ = "uniform lowp vec4 color;\n"
+ "void main() {\n"
+ " gl_FragColor = color;\n"
+ "}\n";
// Must be called on initialization.
bool compile(void);