From 7cb29ce70b18987307ba8fd8d8d8da7316f27339 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sun, 2 Mar 2025 10:47:48 -0800 Subject: [PATCH] [datalog] Fix sorting of related header (#7832) --- datalog/.styleguide | 4 ---- datalog/src/main/native/cpp/DataLog.cpp | 4 ++-- datalog/src/main/native/cpp/DataLogReader.cpp | 3 ++- datalog/src/main/native/cpp/DataLogReaderThread.cpp | 4 ++-- datalog/src/main/native/cpp/DataLogWriter.cpp | 4 ++-- datalog/src/main/native/cpp/FileLogger.cpp | 4 ++-- 6 files changed, 10 insertions(+), 13 deletions(-) diff --git a/datalog/.styleguide b/datalog/.styleguide index 7d2e853332..c2a7b00037 100644 --- a/datalog/.styleguide +++ b/datalog/.styleguide @@ -23,7 +23,3 @@ includeOtherLibs { ^gtest/ ^wpi/(?!datalog) } - -includeProject { - ^wpi/datalog/ -} diff --git a/datalog/src/main/native/cpp/DataLog.cpp b/datalog/src/main/native/cpp/DataLog.cpp index 021ac6b8d4..98cf817117 100644 --- a/datalog/src/main/native/cpp/DataLog.cpp +++ b/datalog/src/main/native/cpp/DataLog.cpp @@ -2,6 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include "wpi/datalog/DataLog.h" + #include #include #include @@ -17,8 +19,6 @@ #include #include -#include "wpi/datalog/DataLog.h" - using namespace wpi::log; static constexpr size_t kRecordMaxHeaderSize = 17; diff --git a/datalog/src/main/native/cpp/DataLogReader.cpp b/datalog/src/main/native/cpp/DataLogReader.cpp index d9ddc229bf..4c9b40221c 100644 --- a/datalog/src/main/native/cpp/DataLogReader.cpp +++ b/datalog/src/main/native/cpp/DataLogReader.cpp @@ -2,13 +2,14 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include "wpi/datalog/DataLogReader.h" + #include #include #include #include "wpi/datalog/DataLog.h" -#include "wpi/datalog/DataLogReader.h" using namespace wpi::log; diff --git a/datalog/src/main/native/cpp/DataLogReaderThread.cpp b/datalog/src/main/native/cpp/DataLogReaderThread.cpp index 830bb6344d..95f9a53921 100644 --- a/datalog/src/main/native/cpp/DataLogReaderThread.cpp +++ b/datalog/src/main/native/cpp/DataLogReaderThread.cpp @@ -2,14 +2,14 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include "wpi/datalog/DataLogReaderThread.h" + #include #include #include #include -#include "wpi/datalog/DataLogReaderThread.h" - using namespace wpi::log; DataLogReaderThread::~DataLogReaderThread() { diff --git a/datalog/src/main/native/cpp/DataLogWriter.cpp b/datalog/src/main/native/cpp/DataLogWriter.cpp index 121c0e92f4..8838a3e676 100644 --- a/datalog/src/main/native/cpp/DataLogWriter.cpp +++ b/datalog/src/main/native/cpp/DataLogWriter.cpp @@ -2,14 +2,14 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include "wpi/datalog/DataLogWriter.h" + #include #include #include #include -#include "wpi/datalog/DataLogWriter.h" - using namespace wpi::log; static std::unique_ptr CheckOpen(std::string_view filename, diff --git a/datalog/src/main/native/cpp/FileLogger.cpp b/datalog/src/main/native/cpp/FileLogger.cpp index 29643dc3b1..6739d8bc1b 100644 --- a/datalog/src/main/native/cpp/FileLogger.cpp +++ b/datalog/src/main/native/cpp/FileLogger.cpp @@ -2,6 +2,8 @@ // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. +#include "wpi/datalog/FileLogger.h" + #ifdef __linux__ #include #include @@ -18,8 +20,6 @@ #include #include -#include "wpi/datalog/FileLogger.h" - namespace wpi::log { FileLogger::FileLogger(std::string_view file, std::function callback)