App: Apply clang format (part 1)

This commit is contained in:
wmayer
2024-11-15 17:43:49 +01:00
committed by wwmayer
parent 463cc08f3f
commit 6f5259af26
124 changed files with 6733 additions and 4886 deletions

View File

@@ -1,25 +1,25 @@
/***************************************************************************
* Copyright (c) 2002 Jürgen Riegel <juergen.riegel@web.de> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Library General Public License (LGPL) *
* as published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* for detail see the LICENCE text file. *
* *
* FreeCAD is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with FreeCAD; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
* USA *
* *
***************************************************************************/
* Copyright (c) 2002 Jürgen Riegel <juergen.riegel@web.de> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Library General Public License (LGPL) *
* as published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* for detail see the LICENCE text file. *
* *
* FreeCAD is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with FreeCAD; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
* USA *
* *
***************************************************************************/
#ifndef PROGRAMOPTIONSUTILITIES_H
#define PROGRAMOPTIONSUTILITIES_H
@@ -28,12 +28,13 @@
#include <array>
#include <string>
namespace App::Util{
namespace App::Util
{
std::pair<std::string, std::string> customSyntax(std::string_view strIn)
{
if(strIn.size() < 2) {
return{};
if (strIn.size() < 2) {
return {};
}
char leadChr {strIn[0]};
@@ -53,7 +54,7 @@ std::pair<std::string, std::string> customSyntax(std::string_view strIn)
}
#endif
if(rest == "widgetcount"){
if (rest == "widgetcount") {
return {rest, ""};
}
@@ -73,11 +74,11 @@ std::pair<std::string, std::string> customSyntax(std::string_view strIn)
"title",
"visual"};
if(std::find(knowns.begin(), knowns.end(), rest) != knowns.end()) {
if (std::find(knowns.begin(), knowns.end(), rest) != knowns.end()) {
return {rest, "null"};
}
return {};
}
} // namespace
#endif// PROGRAMOPTIONSUTILITIES_H
} // namespace App::Util
#endif // PROGRAMOPTIONSUTILITIES_H