Skip to content

Commit

Permalink
Merge branch 'main' of github.com:gazebosim/gz-utils into main
Browse files Browse the repository at this point in the history
  • Loading branch information
nkoenig committed Jul 27, 2023
2 parents 6df06c6 + 215e325 commit d322f1f
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Ubuntu Focal CI
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Compile and test
id: ci
uses: gazebo-tooling/action-gz-ci@focal
Expand All @@ -21,7 +21,7 @@ jobs:
name: Ubuntu Jammy CI
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Compile and test
id: ci
uses: gazebo-tooling/action-gz-ci@jammy
24 changes: 24 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,30 @@

## Gazebo Utils 1.x

## Gazebo Utils 1.5.1 (2022-12-15)

1. Add missing config.hh include to gz headers
* [Pull request #90](https://github.com/gazebosim/gz-utils/pull/90)

## Gazebo Utils 1.5.0 (2022-12-08)

1. Ignition to Gazebo header migration.
* [Pull request #84](https://github.com/gazebosim/gz-utils/pull/84)

1. CI workflow: use checkout v3.
* [Pull request #85](https://github.com/gazebosim/gz-utils/pull/85)

## Gazebo Utils 1.4.1 (2022-11-17)

1. Include <functional> in FormatterFwd.
* [Pull request #58](https://github.com/gazebosim/gz-utils/pull/58)

1. cli_TEST: Fix compatibility with CLI11 2.0.
* [Pull request #60](https://github.com/gazebosim/gz-utils/pull/60)

1. Add code coverage ignore file.
* [Pull request #72](https://github.com/gazebosim/gz-utils/pull/72)

## Gazebo Utils 1.4.0 (2022-03-29)

1. Enable cpplint
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Build | Status
-- | --
Test coverage | [![codecov](https://codecov.io/gh/gazebosim/gz-utils/branch/main/graph/badge.svg)](https://codecov.io/gh/gazebosim/gz-utils)
Ubuntu Focal | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_utils-ci-main-focal-amd64)](https://build.osrfoundation.org/job/ignition_utils-ci-main-focal-amd64)
Ubuntu Focal | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_utils-ci-main-focal-amd64)](https://build.osrfoundation.org/job/ignition_utils-ci-main-focal-amd64)
Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_utils-ci-main-homebrew-amd64)](https://build.osrfoundation.org/job/ignition_utils-ci-main-homebrew-amd64)
Windows | [![Build Status](https://build.osrfoundation.org/job/ign_utils-ci-win/badge/icon)](https://build.osrfoundation.org/job/ign_utils-ci-win/)

Expand Down Expand Up @@ -110,7 +110,7 @@ Refer to the following table for information about important directories and fil
```
gz-utils
├── examples Example programs.
├── include/gz/utils Header files.
├── include/gz/utils Header files.
├── src Source files and unit tests.
├── test
│ ├── integration Integration tests.
Expand Down
2 changes: 1 addition & 1 deletion include/ignition/utils/Environment.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Open Source Robotics Foundation
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion include/ignition/utils/NeverDestroyed.hh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Open Source Robotics Foundation
* Copyright (C) 2022 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
12 changes: 7 additions & 5 deletions src/NeverDestroyed_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <random>
#include <unordered_map>

using namespace gz;

class Boom : public std::exception
{
};
Expand Down Expand Up @@ -63,7 +65,7 @@ GTEST_TEST(NeverDestroyed, NoBoomTest)
try
{
{
gz::utils::NeverDestroyed<DtorGoesBoom> foo;
utils::NeverDestroyed<DtorGoesBoom> foo;
}
ASSERT_TRUE(true);
}
Expand All @@ -83,11 +85,11 @@ class Singleton
public: void operator=(Singleton &&) = delete;
public: static Singleton &getInstance()
{
static gz::utils::NeverDestroyed<Singleton> instance;
static utils::NeverDestroyed<Singleton> instance;
return instance.Access();
}

private: friend gz::utils::NeverDestroyed<Singleton>;
private: friend utils::NeverDestroyed<Singleton>;
private: Singleton() = default;
};

Expand All @@ -108,7 +110,7 @@ enum class Foo
Foo ParseFoo(const std::string &foo_string)
{
using Dict = std::unordered_map<std::string, Foo>;
static const gz::utils::NeverDestroyed<Dict> string_to_enum{
static const utils::NeverDestroyed<Dict> string_to_enum{
std::initializer_list<Dict::value_type>{
{"bar", Foo::kBar},
{"baz", Foo::kBaz},
Expand All @@ -127,7 +129,7 @@ GTEST_TEST(NeverDestroyedExample, ParseFoo)
using Result = std::vector<std::uint_fast32_t>;
const Result &GetConstantMagicNumbers()
{
static const gz::utils::NeverDestroyed<Result> result{
static const utils::NeverDestroyed<Result> result{
[]()
{
Result prototype;
Expand Down

0 comments on commit d322f1f

Please sign in to comment.