clang-format

This commit is contained in:
Erik Frojdh 2020-11-18 18:01:39 +01:00
parent 8565ac6cf2
commit 06dbf82e93
39 changed files with 57 additions and 59 deletions

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include "sls/Detector.h"
#include "qDefs.h" #include "qDefs.h"
#include "sls/Detector.h"
#include "ui_form_detectormain.h" #include "ui_form_detectormain.h"
#include <QTabWidget> #include <QTabWidget>

View File

@ -1,7 +1,7 @@
#include "qTabAdvanced.h" #include "qTabAdvanced.h"
#include "sls/network_utils.h"
#include "qDefs.h" #include "qDefs.h"
#include "qDrawPlot.h" #include "qDrawPlot.h"
#include "sls/network_utils.h"
qTabAdvanced::qTabAdvanced(QWidget *parent, sls::Detector *detector, qTabAdvanced::qTabAdvanced(QWidget *parent, sls::Detector *detector,
qDrawPlot *p) qDrawPlot *p)

View File

@ -1,6 +1,6 @@
#include "qTabDebugging.h" #include "qTabDebugging.h"
#include "sls/ToString.h"
#include "qDefs.h" #include "qDefs.h"
#include "sls/ToString.h"
#include <QDesktopWidget> #include <QDesktopWidget>
#include <QGridLayout> #include <QGridLayout>
#include <QTreeWidget> #include <QTreeWidget>

View File

@ -1,6 +1,6 @@
#include "qTabSettings.h" #include "qTabSettings.h"
#include "sls/ToString.h"
#include "qDefs.h" #include "qDefs.h"
#include "sls/ToString.h"
#include <QStandardItemModel> #include <QStandardItemModel>
qTabSettings::qTabSettings(QWidget *parent, sls::Detector *detector) qTabSettings::qTabSettings(QWidget *parent, sls::Detector *detector)

View File

@ -1,7 +1,7 @@
#include "blackfin.h" #include "blackfin.h"
#include "RegisterDefs.h" #include "RegisterDefs.h"
#include "sls/ansi.h"
#include "clogger.h" #include "clogger.h"
#include "sls/ansi.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <fcntl.h> // open #include <fcntl.h> // open

View File

@ -1,8 +1,8 @@
#include "nios.h" #include "nios.h"
#include "RegisterDefs.h" #include "RegisterDefs.h"
#include "sls/ansi.h"
#include "clogger.h" #include "clogger.h"
#include "common.h" #include "common.h"
#include "sls/ansi.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <fcntl.h> // open #include <fcntl.h> // open

View File

@ -1,6 +1,6 @@
#include "programFpgaBlackfin.h" #include "programFpgaBlackfin.h"
#include "sls/ansi.h"
#include "clogger.h" #include "clogger.h"
#include "sls/ansi.h"
#include "slsDetectorServer_defs.h" #include "slsDetectorServer_defs.h"
#include <string.h> #include <string.h>

View File

@ -1,6 +1,6 @@
#include "programFpgaNios.h" #include "programFpgaNios.h"
#include "sls/ansi.h"
#include "clogger.h" #include "clogger.h"
#include "sls/ansi.h"
#include "slsDetectorServer_defs.h" #include "slsDetectorServer_defs.h"
#include <string.h> #include <string.h>

View File

@ -1,9 +1,9 @@
#include "readDefaultPattern.h" #include "readDefaultPattern.h"
#include "sls/ansi.h"
#include "clogger.h" #include "clogger.h"
#include "common.h" #include "common.h"
#include "slsDetectorServer_defs.h" #include "sls/ansi.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include "slsDetectorServer_defs.h"
#include <string.h> #include <string.h>

View File

@ -4,10 +4,10 @@
#include "clogger.h" #include "clogger.h"
#include "communication_funcs.h" #include "communication_funcs.h"
#include "sharedMemory.h" #include "sharedMemory.h"
#include "slsDetectorServer_defs.h"
#include "slsDetectorServer_funcs.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include "sls/versionAPI.h" #include "sls/versionAPI.h"
#include "slsDetectorServer_defs.h"
#include "slsDetectorServer_funcs.h"
#include <getopt.h> #include <getopt.h>
#include <signal.h> #include <signal.h>
@ -110,8 +110,8 @@ int main(int argc, char *argv[]) {
#elif GOTTHARD2D #elif GOTTHARD2D
version = APIGOTTHARD2; version = APIGOTTHARD2;
#endif #endif
LOG(logINFO, ("SLS Detector Server Version: %s (0x%x)\n", LOG(logINFO, ("SLS Detector Server Version: %s (0x%x)\n", GITBRANCH,
GITBRANCH, version)); version));
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
case 'p': case 'p':

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "sls/Result.h"
#include "SharedMemory.h" #include "SharedMemory.h"
#include "sls/Result.h"
#include "sls/logger.h" #include "sls/logger.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"

View File

@ -1,7 +1,7 @@
#include "test-CmdProxy-global.h" #include "test-CmdProxy-global.h"
#include "CmdProxy.h" #include "CmdProxy.h"
#include "sls/Detector.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/Detector.h"
#include "tests/globals.h" #include "tests/globals.h"
using sls::CmdProxy; using sls::CmdProxy;

View File

@ -1,7 +1,7 @@
#include "catch.hpp"
#include "sls/Result.h" #include "sls/Result.h"
#include "sls/ToString.h" #include "sls/ToString.h"
#include "sls/TypeTraits.h" #include "sls/TypeTraits.h"
#include "catch.hpp"
#include <string> #include <string>
using sls::Result; using sls::Result;

View File

@ -130,4 +130,4 @@ size_t CircularFifo<Element>::increment(size_t i) const {
return i; return i;
} }
} } // namespace sls

View File

@ -4,8 +4,7 @@
class ClientInterface; class ClientInterface;
namespace sls namespace sls {
{
class Receiver : private virtual slsDetectorDefs { class Receiver : private virtual slsDetectorDefs {

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "Implementation.h" #include "Implementation.h"
#include "sls/ServerSocket.h"
#include "receiver_defs.h" #include "receiver_defs.h"
#include "sls/ServerSocket.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include "sls/sls_detector_funcs.h" #include "sls/sls_detector_funcs.h"
class ServerInterface; class ServerInterface;

View File

@ -51,8 +51,8 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
DataProcessor(int ind, detectorType dtype, Fifo *f, fileFormat *ftype, DataProcessor(int ind, detectorType dtype, Fifo *f, fileFormat *ftype,
bool fwenable, bool *mfwenable, bool *dsEnable, bool fwenable, bool *mfwenable, bool *dsEnable,
uint32_t *freq, uint32_t *timer, uint32_t *sfnum, bool *fp, uint32_t *freq, uint32_t *timer, uint32_t *sfnum, bool *fp,
bool *act, bool *depaden, bool *sm, bool *act, bool *depaden, bool *sm, std::vector<int> *cdl,
std::vector<int> *cdl, int *cdo, int *cad); int *cdo, int *cad);
/** /**
* Destructor * Destructor

View File

@ -9,8 +9,8 @@
*data to it *data to it
*/ */
#include "sls/logger.h"
#include "receiver_defs.h" #include "receiver_defs.h"
#include "sls/logger.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <string> #include <string>

View File

@ -7,9 +7,9 @@
*@short abstract for setting/getting properties of detector data *@short abstract for setting/getting properties of detector data
*/ */
#include "receiver_defs.h"
#include "sls/ToString.h" #include "sls/ToString.h"
#include "sls/logger.h" #include "sls/logger.h"
#include "receiver_defs.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <cmath> //ceil #include <cmath> //ceil
#include <vector> #include <vector>

View File

@ -1,8 +1,8 @@
#pragma once #pragma once
#include "receiver_defs.h"
#include "sls/container_utils.h" #include "sls/container_utils.h"
#include "sls/logger.h" #include "sls/logger.h"
#include "sls/network_utils.h" #include "sls/network_utils.h"
#include "receiver_defs.h"
class GeneralData; class GeneralData;
class Listener; class Listener;
class DataProcessor; class DataProcessor;

View File

@ -145,4 +145,4 @@ void Receiver::registerCallBackRawDataModifyReady(
tcpipInterface->registerCallBackRawDataModifyReady(func, arg); tcpipInterface->registerCallBackRawDataModifyReady(func, arg);
} }
} } // namespace sls

View File

@ -1,5 +1,5 @@
#include "sls/CircularFifo.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/CircularFifo.h"
#include <vector> #include <vector>
using sls::CircularFifo; using sls::CircularFifo;

1
slsSupportLib/include/sls/string_utils.h Executable file → Normal file
View File

@ -54,4 +54,3 @@ std::string RemoveUnit(std::string &str);
bool is_int(const std::string &s); bool is_int(const std::string &s);
} // namespace sls } // namespace sls

View File

@ -1,6 +1,6 @@
#include "catch.hpp"
#include "sls/ClientSocket.h" #include "sls/ClientSocket.h"
#include "sls/ServerSocket.h" #include "sls/ServerSocket.h"
#include "catch.hpp"
#include <chrono> #include <chrono>
#include <future> #include <future>
#include <iostream> #include <iostream>

View File

@ -1,6 +1,6 @@
#include "catch.hpp"
#include "sls/StaticVector.h" #include "sls/StaticVector.h"
#include "sls/TypeTraits.h" #include "sls/TypeTraits.h"
#include "catch.hpp"
#include <array> #include <array>
#include <sstream> #include <sstream>

2
slsSupportLib/tests/test-Timer.cpp Executable file → Normal file
View File

@ -1,5 +1,5 @@
#include "sls/Timer.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/Timer.h"
#include <chrono> #include <chrono>
#include <thread> #include <thread>

View File

@ -1,6 +1,6 @@
#include "catch.hpp"
#include "sls/TimeHelper.h" #include "sls/TimeHelper.h"
#include "sls/ToString.h" #include "sls/ToString.h"
#include "catch.hpp"
#include "sls/network_utils.h" #include "sls/network_utils.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include <array> #include <array>

View File

@ -1,5 +1,5 @@
#include "sls/TypeTraits.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/TypeTraits.h"
#include <array> #include <array>
#include <chrono> #include <chrono>
#include <initializer_list> #include <initializer_list>

View File

@ -1,5 +1,5 @@
#include "sls/UdpRxSocket.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/UdpRxSocket.h"
#include "sls/sls_detector_exceptions.h" #include "sls/sls_detector_exceptions.h"
#include <cstdint> #include <cstdint>
#include <errno.h> #include <errno.h>

View File

@ -1,5 +1,5 @@
#include "sls/ZmqSocket.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/ZmqSocket.h"
TEST_CASE("Throws when cannot create socket") { TEST_CASE("Throws when cannot create socket") {
REQUIRE_THROWS(ZmqSocket("sdiasodjajpvv", 5076001)); REQUIRE_THROWS(ZmqSocket("sdiasodjajpvv", 5076001));

View File

@ -1,5 +1,5 @@
#include "sls/bit_utils.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/bit_utils.h"
#include <vector> #include <vector>
TEST_CASE("Get set bits from 0") { TEST_CASE("Get set bits from 0") {

View File

@ -1,5 +1,5 @@
#include "sls/ClientSocket.h"
#include "clara.hpp" #include "clara.hpp"
#include "sls/ClientSocket.h"
#include "sls/sls_detector_exceptions.h" #include "sls/sls_detector_exceptions.h"
#include "tests/testenum.h" #include "tests/testenum.h"

View File

@ -1,5 +1,5 @@
#include "sls/ServerSocket.h"
#include "clara.hpp" #include "clara.hpp"
#include "sls/ServerSocket.h"
#include "tests/testenum.h" #include "tests/testenum.h"

2
tests/test.cpp Executable file → Normal file
View File

@ -3,8 +3,8 @@
// #include "catch.hpp" // #include "catch.hpp"
#define CATCH_CONFIG_RUNNER #define CATCH_CONFIG_RUNNER
#include "sls/ToString.h"
#include "catch.hpp" #include "catch.hpp"
#include "sls/ToString.h"
#include "sls/sls_detector_defs.h" #include "sls/sls_detector_defs.h"
#include "tests/config.h" #include "tests/config.h"
#include <string> #include <string>