From fb9b0d963e0f0983fd07c4b2fd2920decdbe4e48 Mon Sep 17 00:00:00 2001 From: tulipdev Date: Mon, 8 Jan 2018 10:46:35 +0100 Subject: [PATCH] [Jenkins] clang-format commit (08/01/18) --- library/tulip-core/include/tulip/Observable.h | 1 - .../tulip-core/src/PluginLibraryLoader.cpp | 6 ++---- plugins/export/CSVExport.cpp | 2 +- plugins/import/BibTeX/ImportBibTeX.cpp | 4 ++-- software/tulip_perspective/src/main.cpp | 20 ++++++++----------- tests/library/tulip/DataSetTest.cpp | 4 ++-- tests/library/tulip/SuperGraphTest.cpp | 2 +- 7 files changed, 16 insertions(+), 23 deletions(-) diff --git a/library/tulip-core/include/tulip/Observable.h b/library/tulip-core/include/tulip/Observable.h index f4c44dd97f..f713bebd9f 100644 --- a/library/tulip-core/include/tulip/Observable.h +++ b/library/tulip-core/include/tulip/Observable.h @@ -550,7 +550,6 @@ class TLP_SCOPE ObserverHolder { Observable::unholdObservers(); } }; - } #endif diff --git a/library/tulip-core/src/PluginLibraryLoader.cpp b/library/tulip-core/src/PluginLibraryLoader.cpp index 0b1d817011..715cfcd694 100644 --- a/library/tulip-core/src/PluginLibraryLoader.cpp +++ b/library/tulip-core/src/PluginLibraryLoader.cpp @@ -268,8 +268,7 @@ bool PluginLibraryLoader::initPluginDir(PluginLoader *loader, bool recursive) { // don't print error messages when trying to load Tulip Python // binary modules - if (lib.compare(0, 1, "_") == 0 || - lib.find("tulipsip") != std::string::npos) { + if (lib.compare(0, 1, "_") == 0 || lib.find("tulipsip") != std::string::npos) { success = FindNextFile(hFind, &findData); continue; } @@ -355,8 +354,7 @@ bool PluginLibraryLoader::initPluginDir(PluginLoader *loader, bool recursive) { // don't print error messages when trying to load Tulip Python // binary modules - if (lib.compare(0, 1, "_") == 0 || - lib.find("tulipsip") != std::string::npos) { + if (lib.compare(0, 1, "_") == 0 || lib.find("tulipsip") != std::string::npos) { continue; } diff --git a/plugins/export/CSVExport.cpp b/plugins/export/CSVExport.cpp index 1a1e701809..8f2ff592eb 100644 --- a/plugins/export/CSVExport.cpp +++ b/plugins/export/CSVExport.cpp @@ -155,7 +155,7 @@ bool CsvExport::exportGraph(std::ostream &os) { case SEMICOLON_SEPARATOR: fieldSeparator = ';'; - break; + break; default: fieldSeparator = fieldSeparatorCustom; diff --git a/plugins/import/BibTeX/ImportBibTeX.cpp b/plugins/import/BibTeX/ImportBibTeX.cpp index f7c41fe70a..1d088a4b31 100644 --- a/plugins/import/BibTeX/ImportBibTeX.cpp +++ b/plugins/import/BibTeX/ImportBibTeX.cpp @@ -1897,8 +1897,8 @@ class ImportBibTeX : public ImportModule { continue; case '\202': // ł - aKey.replace(k, 2, "l"); - continue; + aKey.replace(k, 2, "l"); + continue; case '\204': // ń case '\206': // ņ diff --git a/software/tulip_perspective/src/main.cpp b/software/tulip_perspective/src/main.cpp index 86030d71f9..8dc4d891a4 100644 --- a/software/tulip_perspective/src/main.cpp +++ b/software/tulip_perspective/src/main.cpp @@ -72,9 +72,8 @@ struct PluginLoaderToProgress : public PluginLoader { int max_step; int step; - PluginLoaderToProgress(PluginProgress* progress = nullptr, - bool debug_output = false) - : _progress(progress), _debug_output(debug_output), max_step(0), step(0) {} + PluginLoaderToProgress(PluginProgress *progress = nullptr, bool debug_output = false) + : _progress(progress), _debug_output(debug_output), max_step(0), step(0) {} void start(const std::string &path) override { step = 0; @@ -87,12 +86,11 @@ struct PluginLoaderToProgress : public PluginLoader { if (state) { _progress->setComment("Plugins successfully loaded"); if (_debug_output) - tlp::debug() << "Plugins successfully loaded" << std::endl; - } - else { + tlp::debug() << "Plugins successfully loaded" << std::endl; + } else { _progress->setComment(msg); if (_debug_output) - tlp::debug() << msg << std::endl; + tlp::debug() << msg << std::endl; } } @@ -108,11 +106,9 @@ struct PluginLoaderToProgress : public PluginLoader { tlp::debug() << "Loading " << filename << std::endl; } - void loaded(const tlp::Plugin* plugin, - const std::list &) override { + void loaded(const tlp::Plugin *plugin, const std::list &) override { if (_debug_output) - tlp::debug() << " - Plugin '" << plugin->name() - << "' registered" << std::endl; + tlp::debug() << " - Plugin '" << plugin->name() << "' registered" << std::endl; } void aborted(const std::string &fileName, const std::string &errorMsg) override { @@ -224,7 +220,7 @@ int main(int argc, char **argv) { context->tulipPort = portRegexp.cap(1).toUInt(); } else if (debugPluginLoadRegExp.exactMatch(a)) debugPluginLoad = true; - else if (idRegexp.exactMatch(a)) { + else if (idRegexp.exactMatch(a)) { context->id = idRegexp.cap(1).toUInt(); #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) QString dumpPath = QDir(QStandardPaths::standardLocations(QStandardPaths::TempLocation).at(0)) diff --git a/tests/library/tulip/DataSetTest.cpp b/tests/library/tulip/DataSetTest.cpp index 6e402dc715..5708cf95b6 100644 --- a/tests/library/tulip/DataSetTest.cpp +++ b/tests/library/tulip/DataSetTest.cpp @@ -109,7 +109,7 @@ struct Struct { ++nbInstances; } - Struct(const std::string &val): value(val) { + Struct(const std::string &val) : value(val) { ++nbInstances; } @@ -117,7 +117,7 @@ struct Struct { --nbInstances; } - Struct(const Struct &st): value(st.value) { + Struct(const Struct &st) : value(st.value) { ++nbInstances; } }; diff --git a/tests/library/tulip/SuperGraphTest.cpp b/tests/library/tulip/SuperGraphTest.cpp index a91a8850da..ecf87b0fd5 100644 --- a/tests/library/tulip/SuperGraphTest.cpp +++ b/tests/library/tulip/SuperGraphTest.cpp @@ -596,7 +596,7 @@ void SuperGraphTest::testInheritance() { CPPUNIT_ASSERT(g3->existProperty("metric")); CPPUNIT_ASSERT(g4->existProperty("metric")); - DoubleProperty* m = graph->getProperty("metric"); + DoubleProperty *m = graph->getProperty("metric"); CPPUNIT_ASSERT_EQUAL(m, graph->getProperty("metric")); CPPUNIT_ASSERT_EQUAL(m, g1->getProperty("metric")); CPPUNIT_ASSERT_EQUAL(m2, g2->getProperty("metric"));