Skip to content

Commit

Permalink
Update clang-format options and run formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kantoniak committed Nov 15, 2018
1 parent c9eb0cc commit f9d4641
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
FixNamespaceComments: false
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
Expand Down
4 changes: 1 addition & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ int main(int argc, char** argv) {
rendering::Renderer renderer(engine);
rendering::UI ui(engine);

if (!windowHandler.createMainWindow() ||
!renderer.init() ||
!ui.init()) {
if (!windowHandler.createMainWindow() || !renderer.init() || !ui.init()) {
engine.stop();
return 1;
}
Expand Down
15 changes: 9 additions & 6 deletions src/rendering/WorldRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,9 @@ void WorldRenderer::renderUI() {
// Icon backgrounds
short speedIcon = world.getTimer().paused() ? 0 : world.getTimer().getSpeed();
nvgBeginPath(context);
nvgRect(context, viewport.x / 2 - topbarWidth / 2 + cityNameBlockWidth + topbarOuterMargin + dateWidth +
2 * topbarInnerMargin + speedIcon * (UI::ICON_SIDE + topbarInnerMargin),
nvgRect(context,
viewport.x / 2 - topbarWidth / 2 + cityNameBlockWidth + topbarOuterMargin + dateWidth +
2 * topbarInnerMargin + speedIcon * (UI::ICON_SIDE + topbarInnerMargin),
topbarHeight / 2 - UI::ICON_SIDE / 2, UI::ICON_SIDE, UI::ICON_SIDE);
nvgFillColor(context, iconBackgroundColor);
nvgFill(context);
Expand All @@ -309,11 +310,13 @@ void WorldRenderer::renderUI() {
nvgFontSize(context, 19.0f);
nvgText(context, viewport.x / 2 - topbarWidth / 2 + cityNameBlockWidth + topbarOuterMargin + topbarInnerMargin,
topbarHeight / 2, date.c_str(), nullptr);
nvgText(context, viewport.x / 2 - topbarWidth / 2 + cityNameBlockWidth + dateBlockWidth + 2 * topbarOuterMargin +
topbarInnerMargin,
nvgText(context,
viewport.x / 2 - topbarWidth / 2 + cityNameBlockWidth + dateBlockWidth + 2 * topbarOuterMargin +
topbarInnerMargin,
topbarHeight / 2, people.c_str(), nullptr);
nvgText(context, viewport.x / 2 - topbarWidth / 2 + cityNameBlockWidth + dateBlockWidth + 2 * topbarOuterMargin +
topbarInnerMargin * 2 + peopleWidth,
nvgText(context,
viewport.x / 2 - topbarWidth / 2 + cityNameBlockWidth + dateBlockWidth + 2 * topbarOuterMargin +
topbarInnerMargin * 2 + peopleWidth,
topbarHeight / 2, money.c_str(), nullptr);

// Speed numbers
Expand Down
2 changes: 1 addition & 1 deletion src/states/MapState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void MapState::onMouseButton(int button, int action, int mods) {
}

if (MapStateAction::PLACE_ROAD == currentAction) {
// Add road
// Add road
}

if (MapStateAction::BULDOZE == currentAction) {
Expand Down

0 comments on commit f9d4641

Please sign in to comment.