Skip to content

Commit

Permalink
refactor(time_utils): prefix package and namespace with autoware
Browse files Browse the repository at this point in the history
Signed-off-by: Esteve Fernandez <[email protected]>
  • Loading branch information
esteve committed Oct 30, 2024
1 parent 94b9ad0 commit 8a53505
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ common/autoware_polar_grid/** [email protected]
common/autoware_signal_processing/** [email protected] [email protected] [email protected] [email protected] [email protected]
common/autoware_test_utils/** [email protected] [email protected] [email protected] [email protected]
common/autoware_testing/** [email protected] [email protected] [email protected] [email protected]
common/autoware_time_utils/** [email protected] [email protected] [email protected]
common/autoware_universe_utils/** [email protected] [email protected] [email protected]
common/autoware_vehicle_info_utils/** [email protected] [email protected] [email protected] [email protected]
common/bag_time_manager_rviz_plugin/** [email protected]
Expand All @@ -38,7 +39,6 @@ common/tier4_state_rviz_plugin/** [email protected] [email protected] khal
common/tier4_system_rviz_plugin/** [email protected]
common/tier4_traffic_light_rviz_plugin/** [email protected]
common/tier4_vehicle_rviz_plugin/** [email protected]
common/time_utils/** [email protected] [email protected] [email protected]
common/traffic_light_recognition_marker_publisher/** [email protected] [email protected] [email protected]
common/traffic_light_utils/** [email protected] [email protected] [email protected]
common/tvm_utility/** [email protected] [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(time_utils)
project(autoware_time_utils)

find_package(autoware_cmake REQUIRED)
autoware_package()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
//
// Co-developed by Tier IV, Inc. and Apex.AI, Inc.

#ifndef TIME_UTILS__STOPWATCH_HPP_
#define TIME_UTILS__STOPWATCH_HPP_
#ifndef AUTOWARE__TIME_UTILS__STOPWATCH_HPP_
#define AUTOWARE__TIME_UTILS__STOPWATCH_HPP_

#include <time_utils/visibility_control.hpp>
#include <autoware/time_utils/visibility_control.hpp>

#include <chrono>
#include <type_traits>
Expand All @@ -26,7 +26,7 @@ namespace autoware
{
namespace common
{
namespace time_utils
namespace autoware::time_utils
{

namespace detail
Expand Down Expand Up @@ -81,8 +81,8 @@ class TIME_UTILS_PUBLIC Stopwatch
TimePoint m_start{Clock::now()};
};

} // namespace time_utils
} // namespace autoware::time_utils
} // namespace common
} // namespace autoware

#endif // TIME_UTILS__STOPWATCH_HPP_
#endif // AUTOWARE__TIME_UTILS__STOPWATCH_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
// limitations under the License.
//
// Co-developed by Tier IV, Inc. and Apex.AI, Inc.
#ifndef TIME_UTILS__TIME_UTILS_HPP_
#define TIME_UTILS__TIME_UTILS_HPP_
#ifndef AUTOWARE__TIME_UTILS__TIME_UTILS_HPP_
#define AUTOWARE__TIME_UTILS__TIME_UTILS_HPP_

#include <autoware/time_utils/visibility_control.hpp>
#include <builtin_interfaces/msg/duration.hpp>
#include <builtin_interfaces/msg/time.hpp>
#include <time_utils/visibility_control.hpp>

#include <chrono>

namespace time_utils
namespace autoware::time_utils
{
/// Standard interpolation
TIME_UTILS_PUBLIC std::chrono::nanoseconds interpolate(
std::chrono::nanoseconds a, std::chrono::nanoseconds b, float t) noexcept;
} // namespace time_utils
} // namespace autoware::time_utils

#endif // TIME_UTILS__TIME_UTILS_HPP_
#endif // AUTOWARE__TIME_UTILS__TIME_UTILS_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef TIME_UTILS__VISIBILITY_CONTROL_HPP_
#define TIME_UTILS__VISIBILITY_CONTROL_HPP_
#ifndef AUTOWARE__TIME_UTILS__VISIBILITY_CONTROL_HPP_
#define AUTOWARE__TIME_UTILS__VISIBILITY_CONTROL_HPP_

#if defined(__WIN32)
#if defined(TIME_UTILS_BUILDING_DLL) || defined(TIME_UTILS_EXPORTS)
Expand All @@ -33,4 +33,4 @@
#error "Unsupported Build Configuration"
#endif // defined(_WINDOWS)

#endif // TIME_UTILS__VISIBILITY_CONTROL_HPP_
#endif // AUTOWARE__TIME_UTILS__VISIBILITY_CONTROL_HPP_
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>time_utils</name>
<name>autoware_time_utils</name>
<version>1.0.0</version>
<description>Simple conversion methods to/from std::chrono to simplify algorithm development</description>
<maintainer email="[email protected]">Christopher Ho</maintainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "time_utils/time_utils.hpp"
#include "autoware/time_utils/time_utils.hpp"

#include <algorithm>
#include <limits>
#include <stdexcept>

namespace time_utils
namespace autoware::time_utils
{
////////////////////////////////////////////////////////////////////////////////
std::chrono::nanoseconds interpolate(
Expand All @@ -30,4 +30,4 @@ std::chrono::nanoseconds interpolate(
return a + del_;
}

} // namespace time_utils
} // namespace autoware::time_utils

0 comments on commit 8a53505

Please sign in to comment.