From 1eeaa4db8235f9ce75b8d7e0c4d0ae24cc73f1fe Mon Sep 17 00:00:00 2001 From: consti10 Date: Sun, 13 Aug 2023 22:45:49 +0200 Subject: [PATCH] optimize imports --- WBLib.cmake | 2 +- executables/benchmark.cpp | 2 +- executables/unit_test.cpp | 2 +- src/{FECEnabled.cpp => FECStream.cpp} | 6 ++---- src/{FECEnabled.h => FECStream.h} | 6 +++--- src/{FECDisabled.hpp => SimpleStream.hpp} | 6 +++--- src/WBStreamRx.h | 9 ++++----- src/WBStreamTx.h | 4 ++-- 8 files changed, 17 insertions(+), 20 deletions(-) rename src/{FECEnabled.cpp => FECStream.cpp} (99%) rename src/{FECEnabled.h => FECStream.h} (99%) rename src/{FECDisabled.hpp => SimpleStream.hpp} (97%) diff --git a/WBLib.cmake b/WBLib.cmake index eaba113d..f710100b 100644 --- a/WBLib.cmake +++ b/WBLib.cmake @@ -25,7 +25,7 @@ target_sources(wifibroadcast PUBLIC # radiotap and fec ${CMAKE_CURRENT_LIST_DIR}/src/external/radiotap/radiotap.c ${CMAKE_CURRENT_LIST_DIR}/src/external/fec/fec_base.cpp - ${CMAKE_CURRENT_LIST_DIR}/src/FECEnabled.cpp + ${CMAKE_CURRENT_LIST_DIR}/src/FECStream.cpp ${CMAKE_CURRENT_LIST_DIR}/src/WBStreamRx.cpp ${CMAKE_CURRENT_LIST_DIR}/src/WBStreamTx.cpp ${CMAKE_CURRENT_LIST_DIR}/src/WBTxRx.cpp diff --git a/executables/benchmark.cpp b/executables/benchmark.cpp index 2e264bec..8a58752c 100644 --- a/executables/benchmark.cpp +++ b/executables/benchmark.cpp @@ -31,7 +31,7 @@ #include #include "../src/Encryption.h" -#include "../src/FECEnabled.h" +#include "../src/FECStream.h" #include "../src/HelperSources/RandomBufferPot.hpp" #include "../src/HelperSources/SchedulingHelper.hpp" diff --git a/executables/unit_test.cpp b/executables/unit_test.cpp index f02d500f..8651a776 100644 --- a/executables/unit_test.cpp +++ b/executables/unit_test.cpp @@ -24,7 +24,7 @@ #include #include -#include "../src/FECEnabled.h" +#include "../src/FECStream.h" //#include "../src/FECEnabled.hpp" #include "../src/Encryption.h" diff --git a/src/FECEnabled.cpp b/src/FECStream.cpp similarity index 99% rename from src/FECEnabled.cpp rename to src/FECStream.cpp index e98472e8..ba6adac2 100644 --- a/src/FECEnabled.cpp +++ b/src/FECStream.cpp @@ -2,13 +2,11 @@ // Created by consti10 on 30.06.23. // -#include "FECEnabled.h" - #include -#include "wifibroadcast-spdlog.h" - #include "FEC.hpp" +#include "FECStream.h" +#include "wifibroadcast-spdlog.h" void FECEncoder::encode_block( std::vector>> data_packets, diff --git a/src/FECEnabled.h b/src/FECStream.h similarity index 99% rename from src/FECEnabled.h rename to src/FECStream.h index 4a659c6c..0509edeb 100644 --- a/src/FECEnabled.h +++ b/src/FECStream.h @@ -2,8 +2,8 @@ // Created by consti10 on 28.06.23. // -#ifndef WIFIBROADCAST_FECENABLED_H -#define WIFIBROADCAST_FECENABLED_H +#ifndef WIFIBROADCAST_FECSTREAM_H +#define WIFIBROADCAST_FECSTREAM_H #include #include @@ -274,4 +274,4 @@ class FECDecoder { // which means you might lose a couple of blocks once every 4.6 h ) // and 8 bits holds max 255. -#endif // WIFIBROADCAST_FECENABLED_H +#endif // WIFIBROADCAST_FECSTREAM_H diff --git a/src/FECDisabled.hpp b/src/SimpleStream.hpp similarity index 97% rename from src/FECDisabled.hpp rename to src/SimpleStream.hpp index 230e5ff5..df8029c7 100644 --- a/src/FECDisabled.hpp +++ b/src/SimpleStream.hpp @@ -2,8 +2,8 @@ // Created by consti10 on 10.03.21. // -#ifndef WIFIBROADCAST_FECDISABLED_HPP -#define WIFIBROADCAST_FECDISABLED_HPP +#ifndef WIFIBROADCAST_SIMPLESTREAM_HPP +#define WIFIBROADCAST_SIMPLESTREAM_HPP #include #include @@ -109,4 +109,4 @@ class FECDisabledDecoder { } }; -#endif //WIFIBROADCAST_FECDISABLED_HPP +#endif // WIFIBROADCAST_SIMPLESTREAM_HPP diff --git a/src/WBStreamRx.h b/src/WBStreamRx.h index ba3c1076..8ea3408c 100644 --- a/src/WBStreamRx.h +++ b/src/WBStreamRx.h @@ -5,18 +5,17 @@ #ifndef WIFIBROADCAST_WBSTREAMRX_H #define WIFIBROADCAST_WBSTREAMRX_H -#include "FECDisabled.hpp" -#include "FECEnabled.h" +#include "../moodycamel/concurrentqueue/blockingconcurrentqueue.h" +#include "../moodycamel/readerwriterqueue/readerwritercircularbuffer.h" +#include "FECStream.h" #include "HelperSources/Helper.hpp" #include "HelperSources/SeqNrHelper.hpp" #include "HelperSources/SequenceNumberDebugger.hpp" #include "HelperSources/TimeHelper.hpp" +#include "SimpleStream.hpp" #include "WBTxRx.h" #include "wifibroadcast-spdlog.h" -#include "../moodycamel/concurrentqueue/blockingconcurrentqueue.h" -#include "../moodycamel/readerwriterqueue/readerwritercircularbuffer.h" - /** * Receiver for a (multiplexed) wifbroadcast stream * uses WBTxRx to receive packets diff --git a/src/WBStreamTx.h b/src/WBStreamTx.h index 0a8cbfbe..cc745946 100644 --- a/src/WBStreamTx.h +++ b/src/WBStreamTx.h @@ -11,8 +11,8 @@ #include "../moodycamel/concurrentqueue/blockingconcurrentqueue.h" #include "../moodycamel/readerwriterqueue/readerwritercircularbuffer.h" -#include "FECDisabled.hpp" -#include "FECEnabled.h" +#include "FECStream.h" +#include "SimpleStream.hpp" #include "TimeHelper.hpp" #include "WBTxRx.h"