Skip to content

Commit 9a8f143

Browse files
authored
Clang format (#3861)
- abbreviation/*.* - AutoSave/*.* - CallGraph/*.* - CMakePlugin/*.* - CodeFormatter/*.* - codelite_echo/*.* - codelite_make/*.* - codelite_makedir/*.* - codelite_vim/*.* - CodeLiteDiff/*.* - codelitephp/**.* - ContinuousBuild/*.* - Copyright/*.* - cppchecker/*.* - cscope/*.* - ctagsd/**.* - CxxParser/*.* (fix headers)
1 parent 23f4ad6 commit 9a8f143

File tree

168 files changed

+3666
-3475
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+3666
-3475
lines changed

AutoSave/AutoSaveDlg.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "AutoSaveDlg.h"
2+
23
#include "AutoSaveSettings.h"
34

45
AutoSaveDlg::AutoSaveDlg(wxWindow* parent)

AutoSave/autosave.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
#include <wx/xrc/xmlres.h>
99

1010
// Define the plugin entry point
11-
CL_PLUGIN_API IPlugin* CreatePlugin(IManager* manager)
12-
{
13-
return new AutoSave(manager);
14-
}
11+
CL_PLUGIN_API IPlugin* CreatePlugin(IManager* manager) { return new AutoSave(manager); }
1512

1613
CL_PLUGIN_API PluginInfo* GetPluginInfo()
1714
{
@@ -54,7 +51,7 @@ void AutoSave::UnPlug()
5451
void AutoSave::OnSettings(wxCommandEvent& event)
5552
{
5653
AutoSaveDlg dlg(EventNotifier::Get()->TopFrame());
57-
if(dlg.ShowModal() == wxID_OK) {
54+
if (dlg.ShowModal() == wxID_OK) {
5855
// Update the settings
5956
UpdateTimers();
6057
}
@@ -64,7 +61,7 @@ void AutoSave::UpdateTimers()
6461
{
6562
DeleteTimer();
6663
AutoSaveSettings conf = AutoSaveSettings::Load();
67-
if(!conf.HasFlag(AutoSaveSettings::kEnabled)) {
64+
if (!conf.HasFlag(AutoSaveSettings::kEnabled)) {
6865
return;
6966
}
7067

@@ -79,11 +76,11 @@ void AutoSave::OnTimer(wxTimerEvent& event)
7976
m_mgr->GetAllEditors(editors);
8077

8178
// Save every modified editor
82-
for(auto editor : editors) {
79+
for (auto editor : editors) {
8380
// Save modified files. However, don't attempt to try and save an "Untitled" document :/
8481
bool local_file_and_exists = !editor->IsRemoteFile() && editor->GetFileName().FileExists();
8582
bool is_remote = editor->IsRemoteFile();
86-
if(editor->IsEditorModified() && (local_file_and_exists || is_remote)) {
83+
if (editor->IsEditorModified() && (local_file_and_exists || is_remote)) {
8784
editor->Save();
8885
}
8986
}
@@ -95,7 +92,7 @@ void AutoSave::OnTimer(wxTimerEvent& event)
9592

9693
void AutoSave::DeleteTimer()
9794
{
98-
if(m_timer) {
95+
if (m_timer) {
9996
Unbind(wxEVT_TIMER, &AutoSave::OnTimer, this);
10097
m_timer->Stop();
10198
}

AutoSave/autosave.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#define __AutoSave__
2828

2929
#include "plugin.h"
30+
3031
#include <wx/timer.h>
3132

3233
class AutoSave : public IPlugin
@@ -39,7 +40,7 @@ class AutoSave : public IPlugin
3940

4041
void UpdateTimers();
4142
void DeleteTimer();
42-
43+
4344
public:
4445
AutoSave(IManager* manager);
4546
~AutoSave() override = default;

CMakePlugin/CMake.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ CMake::CMake(const wxFileName& path)
118118

119119
wxArrayString CMake::GetVersions()
120120
{
121-
static const wxString VERSIONS[] = { "2.8.11", "2.8.10", "2.8.9", "2.8.8", "2.8.7", "2.8.6", "2.8.5",
122-
"2.8.4", "2.8.3", "2.8.2", "2.8.1", "2.8.0", "2.6.4", "2.6.3",
123-
"2.6.2", "2.6.1", "2.6.0", "2.4.8", "2.4.7", "2.4.6", "2.4.5",
124-
"2.4.4", "2.4.3", "2.2.3", "2.0.6", "1.8.3" };
121+
static const wxString VERSIONS[] = {"2.8.11", "2.8.10", "2.8.9", "2.8.8", "2.8.7", "2.8.6", "2.8.5",
122+
"2.8.4", "2.8.3", "2.8.2", "2.8.1", "2.8.0", "2.6.4", "2.6.3",
123+
"2.6.2", "2.6.1", "2.6.0", "2.4.8", "2.4.7", "2.4.6", "2.4.5",
124+
"2.4.4", "2.4.3", "2.2.3", "2.0.6", "1.8.3"};
125125

126126
return wxArrayString(sizeof(VERSIONS) / sizeof(VERSIONS[0]), VERSIONS);
127127
}

CMakePlugin/CMake.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@
5454
#include <map>
5555

5656
// wxWidgets
57-
#include <wx/string.h>
58-
#include <wx/filename.h>
5957
#include <wx/arrstr.h>
60-
#include <wx/vector.h>
58+
#include <wx/filename.h>
6159
#include <wx/progdlg.h>
60+
#include <wx/string.h>
61+
#include <wx/vector.h>
6262
#include <wx/wxsqlite3.h>
6363

6464
/* ************************************************************************ */

CMakePlugin/CMakeBuilder.cpp

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ CMakeBuilder::CMakeBuilder()
99
{
1010
}
1111

12-
bool CMakeBuilder::Export(const wxString& project, const wxString& confToBuild, const wxString& arguments,
13-
bool isProjectOnly, bool force, wxString& errMsg)
12+
bool CMakeBuilder::Export(const wxString& project,
13+
const wxString& confToBuild,
14+
const wxString& arguments,
15+
bool isProjectOnly,
16+
bool force,
17+
wxString& errMsg)
1418
{
1519
wxUnusedVar(project);
1620
wxUnusedVar(confToBuild);
@@ -38,40 +42,45 @@ wxString CMakeBuilder::GetBuildCommand(const wxString& project, const wxString&
3842
return command;
3943
}
4044

41-
wxString CMakeBuilder::GetPOCleanCommand(const wxString& project, const wxString& confToBuild,
42-
const wxString& arguments)
45+
wxString
46+
CMakeBuilder::GetPOCleanCommand(const wxString& project, const wxString& confToBuild, const wxString& arguments)
4347
{
4448
wxString command;
4549
command << "cd " << GetProjectBuildFolder(project, true) << " && " << GetBuildToolCommand(project, confToBuild)
4650
<< " clean";
4751
return command;
4852
}
4953

50-
wxString CMakeBuilder::GetPOBuildCommand(const wxString& project, const wxString& confToBuild,
51-
const wxString& arguments)
54+
wxString
55+
CMakeBuilder::GetPOBuildCommand(const wxString& project, const wxString& confToBuild, const wxString& arguments)
5256
{
5357
wxString command;
5458
command << "cd " << GetProjectBuildFolder(project, true) << " && " << GetBuildToolCommand(project, confToBuild);
5559
return command;
5660
}
5761

58-
wxString CMakeBuilder::GetPORebuildCommand(const wxString& project, const wxString& confToBuild,
59-
const wxString& arguments)
62+
wxString
63+
CMakeBuilder::GetPORebuildCommand(const wxString& project, const wxString& confToBuild, const wxString& arguments)
6064
{
6165
wxString command;
6266
command << "cd " << GetProjectBuildFolder(project, true) << " && " << GetBuildToolCommand(project, confToBuild)
6367
<< " clean all";
6468
return command;
6569
}
6670

67-
wxString CMakeBuilder::GetSingleFileCmd(const wxString& project, const wxString& confToBuild, const wxString& arguments,
71+
wxString CMakeBuilder::GetSingleFileCmd(const wxString& project,
72+
const wxString& confToBuild,
73+
const wxString& arguments,
6874
const wxString& fileName)
6975
{
7076
return wxEmptyString;
7177
}
7278

73-
wxString CMakeBuilder::GetPreprocessFileCmd(const wxString& project, const wxString& confToBuild,
74-
const wxString& arguments, const wxString& fileName, wxString& errMsg)
79+
wxString CMakeBuilder::GetPreprocessFileCmd(const wxString& project,
80+
const wxString& confToBuild,
81+
const wxString& arguments,
82+
const wxString& fileName,
83+
wxString& errMsg)
7584
{
7685
return wxEmptyString;
7786
}
@@ -83,7 +92,9 @@ wxString CMakeBuilder::GetWorkspaceBuildFolder(bool wrapWithQuotes)
8392

8493
fn.AppendDir(CMAKE_BUILD_FOLDER_PREFIX + workspaceConfig);
8594
wxString folder = fn.GetPath();
86-
if(wrapWithQuotes) { StringUtils::WrapWithQuotes(folder); }
95+
if (wrapWithQuotes) {
96+
StringUtils::WrapWithQuotes(folder);
97+
}
8798
return folder;
8899
}
89100

@@ -107,14 +118,16 @@ wxString CMakeBuilder::GetProjectBuildFolder(const wxString& project, bool wrapW
107118
wxString CMakeBuilder::GetBuildToolCommand(const wxString& project, const wxString& confToBuild) const
108119
{
109120
BuildConfigPtr bldConf = clCxxWorkspaceST::Get()->GetProjBuildConf(project, confToBuild);
110-
if(!bldConf) return wxEmptyString;
121+
if (!bldConf)
122+
return wxEmptyString;
111123

112124
// The 'make' command is part of the compiler settings
113125
CompilerPtr compiler = bldConf->GetCompiler();
114-
if(!compiler) return wxEmptyString;
126+
if (!compiler)
127+
return wxEmptyString;
115128

116129
wxString buildTool = compiler->GetTool("MAKE");
117-
if(buildTool.Lower().Contains("make")) {
130+
if (buildTool.Lower().Contains("make")) {
118131
return buildTool + " -e ";
119132

120133
} else {

CMakePlugin/CMakeBuilder.h

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ class CMakeBuilder : public Builder
2323
* \param errMsg output
2424
* \return true on success, false otherwise.
2525
*/
26-
virtual bool Export(const wxString& project, const wxString& confToBuild, const wxString& arguments,
27-
bool isProjectOnly, bool force, wxString& errMsg);
26+
virtual bool Export(const wxString& project,
27+
const wxString& confToBuild,
28+
const wxString& arguments,
29+
bool isProjectOnly,
30+
bool force,
31+
wxString& errMsg);
2832

2933
/**
3034
* Return the command that should be executed for performing the clean
@@ -60,8 +64,10 @@ class CMakeBuilder : public Builder
6064
* \param errMsg [output]
6165
* \return the command
6266
*/
63-
virtual wxString GetSingleFileCmd(
64-
const wxString& project, const wxString& confToBuild, const wxString& arguments, const wxString& fileName);
67+
virtual wxString GetSingleFileCmd(const wxString& project,
68+
const wxString& confToBuild,
69+
const wxString& arguments,
70+
const wxString& fileName);
6571

6672
/**
6773
* \brief create a command to execute for preprocessing single source file
@@ -70,17 +76,20 @@ class CMakeBuilder : public Builder
7076
* \param errMsg [output]
7177
* \return the command
7278
*/
73-
virtual wxString GetPreprocessFileCmd(const wxString& project, const wxString& confToBuild,
74-
const wxString& arguments, const wxString& fileName, wxString& errMsg);
79+
virtual wxString GetPreprocessFileCmd(const wxString& project,
80+
const wxString& confToBuild,
81+
const wxString& arguments,
82+
const wxString& fileName,
83+
wxString& errMsg);
7584

7685
/**
7786
* @brief return the 'rebuild' command
7887
* @param project
7988
* @param confToBuild
8089
* @return
8190
*/
82-
virtual wxString GetPORebuildCommand(
83-
const wxString& project, const wxString& confToBuild, const wxString& arguments);
91+
virtual wxString
92+
GetPORebuildCommand(const wxString& project, const wxString& confToBuild, const wxString& arguments);
8493
};
8594

8695
#endif // CMAKEBUILDER_H

CMakePlugin/CMakeConfiguration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
/* ************************************************************************ */
5252

5353
// wxWidgets
54-
#include <wx/string.h>
5554
#include <wx/fileconf.h>
55+
#include <wx/string.h>
5656

5757
/* ************************************************************************ */
5858
/* CLASSES */

0 commit comments

Comments
 (0)