Skip to content

Commit

Permalink
Add InsertBraces to clang-format and update repo accordingly (#1952)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwestphal authored Jan 29, 2025
1 parent 0d23354 commit 0111398
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ BinPackParameters: true
BraceWrapping:
BeforeLambdaBody: true
ColumnLimit: 100
InsertBraces: true
# Note that on versions after 4.0 you need to specify
# SpaceAfterTemplateKeyword: true
# which is not an option prior to 4.0. Later versions
Expand Down
8 changes: 8 additions & 0 deletions vtkext/private/module/Testing/TestF3DOpenGLGridMapper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ int TestF3DOpenGLGridMapper(int argc, char* argv[])
mapper->Print(std::cout);

if (!CheckBounds("default", mapper, -5, +5, -safeMargin, +safeMargin, -5, +5))
{
return EXIT_FAILURE;
}
}

{
Expand All @@ -64,15 +66,21 @@ int TestF3DOpenGLGridMapper(int argc, char* argv[])

mapper->SetUpIndex(0);
if (!CheckBounds("YZ with offset", mapper, -safeMargin, +safeMargin, -r, +r, -r, +r))
{
return EXIT_FAILURE;
}

mapper->SetUpIndex(1);
if (!CheckBounds("XZ with offset", mapper, -r, +r, -safeMargin, +safeMargin, -r, +r))
{
return EXIT_FAILURE;
}

mapper->SetUpIndex(2);
if (!CheckBounds("XY with offset", mapper, -r, +r, -r, +r, -safeMargin, +safeMargin))
{
return EXIT_FAILURE;
}
}

return EXIT_SUCCESS;
Expand Down
4 changes: 4 additions & 0 deletions vtkext/private/module/vtkF3DImguiConsole.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,15 @@ void vtkF3DImguiConsole::ShowConsole()

ImGui::TextUnformatted(msg.c_str());
if (hasColor)
{
ImGui::PopStyleColor();
}
}

if (ImGui::GetScrollY() >= ImGui::GetScrollMaxY())
{
ImGui::SetScrollHereY(1.0f);
}

ImGui::PopStyleVar();
}
Expand Down
2 changes: 2 additions & 0 deletions vtkext/private/module/vtkF3DRenderer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,9 @@ void vtkF3DRenderer::ConfigureGridUsingCurrentActors()
gridMapper->SetSubdivisions(this->GridSubdivisions);
gridMapper->SetUpIndex(this->UpIndex);
if (this->GridAbsolute)
{
gridMapper->SetOriginOffset(-gridPos[0], -gridPos[1], -gridPos[2]);
}

this->GridActor->GetProperty()->SetColor(this->GridColor);
this->GridActor->ForceTranslucentOn();
Expand Down
3 changes: 1 addition & 2 deletions winshellext/F3DShellExtension.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ STDAPI DllRegisterServer()
}
// Register the thumbnail handler. The thumbnail handler is associated
// with the f3d file class.
RunOnJSONExtensions(szModuleName,
[&](const std::wstring& ext)
RunOnJSONExtensions(szModuleName, [&](const std::wstring& ext)
{ hr |= RegisterShellExtThumbnailHandler(ext.c_str(), CLSID_F3DThumbnailProvider); });

if (SUCCEEDED(hr))
Expand Down

0 comments on commit 0111398

Please sign in to comment.