Skip to content

Commit

Permalink
New clang-tidy things
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston committed Aug 9, 2024
1 parent 26b917b commit 6cd5848
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/threading/ReactionHandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@

#include "ReactionHandle.hpp"

#include <memory>

#include "Reaction.hpp"

namespace NUClear {
namespace threading {

Expand Down
4 changes: 4 additions & 0 deletions src/threading/scheduler/CombinedLock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
*/
#include "CombinedLock.hpp"

#include <memory>
#include <thread>
#include <utility>

namespace NUClear {
namespace threading {
namespace scheduler {
Expand Down
1 change: 0 additions & 1 deletion src/threading/scheduler/CountingLock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "CountingLock.hpp"

#include <atomic>
#include <utility>

namespace NUClear {
namespace threading {
Expand Down
1 change: 1 addition & 0 deletions src/util/FileDescriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include "FileDescriptor.hpp"

#include <functional>
#include <utility>

#include "platform.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/util/Sleeper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include "Sleeper.hpp"

#include <array>
#include <chrono>

#if defined(_WIN32)
Expand Down Expand Up @@ -63,7 +62,6 @@ namespace util {
#else

#include <cerrno>
#include <cstdint>
#include <ctime>

namespace NUClear {
Expand Down
2 changes: 2 additions & 0 deletions src/util/main_thread_id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

#include "main_thread_id.hpp"

#include <thread>

namespace NUClear {
namespace util {

Expand Down
3 changes: 3 additions & 0 deletions src/util/network/resolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@

#include "resolve.hpp"

#include <cstdint>
#include <cstring>
#include <memory>
#include <stdexcept>
#include <string>
#include <system_error>

#include "../platform.hpp"
#include "sock_t.hpp"

namespace NUClear {
namespace util {
Expand Down
4 changes: 2 additions & 2 deletions src/util/network/sock_t.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace util {
sockaddr_in6 ipv6;
};

inline socklen_t size() const {
socklen_t size() const {
switch (sock.sa_family) {
case AF_INET: return sizeof(sockaddr_in);
case AF_INET6: return sizeof(sockaddr_in6);
Expand All @@ -50,7 +50,7 @@ namespace util {
}
}

inline std::pair<std::string, in_port_t> address() const {
std::pair<std::string, in_port_t> address() const {
std::array<char, std::max(INET_ADDRSTRLEN, INET6_ADDRSTRLEN)> c = {0};
switch (sock.sa_family) {
case AF_INET:
Expand Down
1 change: 1 addition & 0 deletions src/util/serialise/xxhash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include "xxhash.hpp"

#include <cstdint>
#include <type_traits>

namespace NUClear {
Expand Down

0 comments on commit 6cd5848

Please sign in to comment.