Skip to content

Commit

Permalink
Include what you use (#107)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll authored Oct 13, 2023
1 parent a962cb2 commit 7b3da59
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package(
features = GZ_FEATURES,
)

licenses(["notice"]) # Apache-2.0
licenses(["notice"])

exports_files(["LICENSE"])

Expand Down
2 changes: 2 additions & 0 deletions cli/include/gz/utils/cli/GzFormatter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
#define GZ_UTILS_CLI_GZ_FORMATTER_HPP_

#include <algorithm>
#include <iterator>
#include <string>
#include <sstream>
#include <vector>
#include <unordered_map>

#include "gz/utils/cli/App.hpp"
#include "gz/utils/cli/FormatterFwd.hpp"
#include "gz/utils/cli/StringTools.hpp"
#include "gz/utils/Export.hh"

//////////////////////////////////////////////////
Expand Down
3 changes: 1 addition & 2 deletions src/Environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
#include <gz/utils/Environment.hh>

#include <cstdlib>
#include <iostream>

#include <string>

namespace gz
{
Expand Down
2 changes: 2 additions & 0 deletions src/Environment_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

#include <gz/utils/Environment.hh>

#include <string>

using namespace gz;

/////////////////////////////////////////////////
Expand Down
5 changes: 5 additions & 0 deletions src/NeverDestroyed_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@

#include <gtest/gtest.h>

#include <cstdint>
#include <exception>
#include <initializer_list>
#include <random>
#include <string>
#include <vector>
#include <unordered_map>

using namespace gz;
Expand Down
3 changes: 2 additions & 1 deletion test/integration/implptr/ImplPtr_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@

#include <gtest/gtest.h>

#include <gz/utils/ImplPtr.hh>
#include "implptr_test_classes.hh"

#include <utility>

using namespace gz::implptr_test_classes;

/////////////////////////////////////////////////
Expand Down
3 changes: 2 additions & 1 deletion test/integration/implptr/implptr_test_classes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include "implptr_test_classes.hh"

#include <gz/utils/ImplPtr.hh>

#include <string>
#include <thread>

Expand Down Expand Up @@ -153,4 +155,3 @@ void CopyableObjectAlt::SetString(const std::string &_value)
{
(*dataPtr).svalue = _value;
}

6 changes: 3 additions & 3 deletions test/integration/implptr/implptr_test_classes.hh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace gz
public: int GetInt() const;

/// \brief Set the int value held by the pimpl
public: void SetInt(const int _value);
public: void SetInt(int _value);

/// \brief Get the string value held by the pimpl
public: const std::string &GetString() const;
Expand Down Expand Up @@ -72,7 +72,7 @@ namespace gz
public: int GetInt() const;

/// \brief Set the int value held by the pimpl
public: void SetInt(const int _value);
public: void SetInt(int _value);

/// \brief Get the string value held by the pimpl
public: const std::string &GetString() const;
Expand Down Expand Up @@ -102,7 +102,7 @@ namespace gz
public: int GetInt() const;

/// \brief Set the int value held by the pimpl
public: void SetInt(const int _value);
public: void SetInt(int _value);

/// \brief Get the string value held by the pimpl
public: const std::string &GetString() const;
Expand Down

0 comments on commit 7b3da59

Please sign in to comment.