Skip to content

Commit 9f3e89e

Browse files
authored
feat: use clang-tidy for static analysis (#495)
1 parent 6f694e3 commit 9f3e89e

95 files changed

Lines changed: 2428 additions & 2052 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-tidy

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
# TODO: enable -llvm-include-order in the end, after clang-format
3+
Checks: "*,\
4+
-llvmlibc-*,\
5+
-altera-*,\
6+
-fuchsia-*,
7+
-cert-err58-cpp,\
8+
-modernize-use-trailing-return-type,\
9+
-cppcoreguidelines-avoid-magic-numbers,\
10+
-readability-magic-numbers,\
11+
-readability-braces-around-statements,\
12+
-google-readability-braces-around-statements,\
13+
-hicpp-braces-around-statements,\
14+
-hicpp-signed-bitwise,\
15+
-llvm-include-order,\
16+
-llvm-header-guard,\
17+
-google-runtime-int,\
18+
-google-default-arguments,\
19+
-hicpp-named-parameter,\
20+
-readability-named-parameter,\
21+
-bugprone-macro-parentheses,\
22+
-google-readability-todo,\
23+
-google-build-using-namespace,\
24+
-cppcoreguidelines-pro-type-reinterpret-cast,\
25+
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,\
26+
-hicpp-no-array-decay,\
27+
-cppcoreguidelines-avoid-c-arrays,\
28+
-hicpp-avoid-c-arrays,\
29+
-cppcoreguidelines-non-private-member-variables-in-classes,\
30+
-misc-non-private-member-variables-in-classes,\
31+
-modernize-avoid-c-arrays"
32+
33+
HeaderFilterRegex: '.*'
34+
FormatStyle: file
35+
WarningsAsErrors: "*"
36+
CheckOptions:
37+
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
38+
value: '1'
39+
- key: readability-implicit-bool-conversion.AllowPointerConditions
40+
value: '1'
41+
- key: readability-implicit-bool-conversion.AllowIntegerConditions
42+
value: '1'
43+
- key: readability-redundant-member-init.IgnoreBaseInCopyConstructors
44+
value: '1'
45+
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
46+
value: '1'
47+
- key: hicpp-special-member-functions.AllowSoleDefaultDtor
48+
value: '1'
49+
- key: readability-identifier-length.IgnoredVariableNames
50+
value: 'r|t|fd|id|ok|it|ts'
51+
- key: readability-identifier-length.IgnoredParameterNames
52+
value: 'fd|id|b'
53+
- key: performance-move-const-arg.CheckTriviallyCopyableMove
54+
value: '0'
55+
- key: hicpp-move-const-arg.CheckTriviallyCopyableMove
56+
value: '0'
57+
- key: misc-include-cleaner.IgnoreHeaders
58+
value: 'systemd/.*|sdbus-c\+\+/.*|gtest/.*|gmock/.*|bits/chrono.h|bits/basic_string.h|time.h|poll.h|stdlib.h'
59+
- key: readability-simplify-boolean-expr.IgnoreMacros
60+
value: '1'
61+
- key: cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams
62+
value: '1'
63+
# - key: bugprone-easily-swappable-parameters.MinimumLength
64+
# value: '3'
65+
# - key: readability-braces-around-statements.ShortStatementLines
66+
# value: '3'

.github/workflows/ci.yml

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,44 +46,57 @@ jobs:
4646
- name: configure-debug-gcc11 # For gcc 11, turn off the annoying deprecated-copy warning
4747
if: matrix.build == 'shared-libsystemd' && matrix.compiler == 'g++' && matrix.os == 'ubuntu-22.04'
4848
run: |
49-
mkdir build
50-
cd build
51-
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_CXX_FLAGS="-O0 -g -W -Wextra -Wall -Wnon-virtual-dtor -Wno-deprecated-copy -Werror $SDBUSCPP_EXTRA_CXX_FLAGS" -DCMAKE_VERBOSE_MAKEFILE=ON -DSDBUSCPP_INSTALL=ON -DSDBUSCPP_BUILD_TESTS=ON -DSDBUSCPP_BUILD_PERF_TESTS=ON -DSDBUSCPP_BUILD_STRESS_TESTS=ON -DSDBUSCPP_BUILD_CODEGEN=ON -DSDBUSCPP_GOOGLETEST_VERSION=1.14.0 ..
49+
cmake -B _build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_CXX_FLAGS="-O0 -g -W -Wextra -Wall -Wnon-virtual-dtor -Wno-deprecated-copy -Werror $SDBUSCPP_EXTRA_CXX_FLAGS" -DCMAKE_VERBOSE_MAKEFILE=ON -DSDBUSCPP_INSTALL=ON -DSDBUSCPP_BUILD_TESTS=ON -DSDBUSCPP_BUILD_PERF_TESTS=ON -DSDBUSCPP_BUILD_STRESS_TESTS=ON -DSDBUSCPP_BUILD_CODEGEN=ON -DSDBUSCPP_GOOGLETEST_VERSION=1.14.0
5250
- name: configure-debug
5351
if: matrix.build == 'shared-libsystemd' && (matrix.compiler != 'g++' || matrix.os != 'ubuntu-22.04')
5452
run: |
55-
mkdir build
56-
cd build
57-
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_CXX_FLAGS="-O0 -g -W -Wextra -Wall -Wnon-virtual-dtor -Werror $SDBUSCPP_EXTRA_CXX_FLAGS" -DCMAKE_VERBOSE_MAKEFILE=ON -DSDBUSCPP_INSTALL=ON -DSDBUSCPP_BUILD_TESTS=ON -DSDBUSCPP_BUILD_PERF_TESTS=ON -DSDBUSCPP_BUILD_STRESS_TESTS=ON -DSDBUSCPP_BUILD_CODEGEN=ON -DSDBUSCPP_GOOGLETEST_VERSION=1.14.0 ..
53+
cmake -B _build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_CXX_FLAGS="-O0 -g -W -Wextra -Wall -Wnon-virtual-dtor -Werror $SDBUSCPP_EXTRA_CXX_FLAGS" -DCMAKE_VERBOSE_MAKEFILE=ON -DSDBUSCPP_INSTALL=ON -DSDBUSCPP_BUILD_TESTS=ON -DSDBUSCPP_BUILD_PERF_TESTS=ON -DSDBUSCPP_BUILD_STRESS_TESTS=ON -DSDBUSCPP_BUILD_CODEGEN=ON -DSDBUSCPP_GOOGLETEST_VERSION=1.14.0
5854
- name: configure-release-with-embedded-libsystemd
5955
if: matrix.build == 'embedded-static-libsystemd'
6056
run: |
61-
mkdir build
62-
cd build
63-
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_CXX_FLAGS="$SDBUSCPP_EXTRA_CXX_FLAGS" -DCMAKE_VERBOSE_MAKEFILE=ON -DSDBUSCPP_INSTALL=ON -DSDBUSCPP_BUILD_TESTS=ON -DSDBUSCPP_BUILD_PERF_TESTS=ON -DSDBUSCPP_BUILD_STRESS_TESTS=ON -DSDBUSCPP_BUILD_CODEGEN=ON -DSDBUSCPP_BUILD_LIBSYSTEMD=ON -DSDBUSCPP_LIBSYSTEMD_VERSION=252 -DSDBUSCPP_GOOGLETEST_VERSION=1.14.0 ..
57+
cmake -B _build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_CXX_FLAGS="$SDBUSCPP_EXTRA_CXX_FLAGS" -DCMAKE_VERBOSE_MAKEFILE=ON -DSDBUSCPP_INSTALL=ON -DSDBUSCPP_BUILD_TESTS=ON -DSDBUSCPP_BUILD_PERF_TESTS=ON -DSDBUSCPP_BUILD_STRESS_TESTS=ON -DSDBUSCPP_BUILD_CODEGEN=ON -DSDBUSCPP_BUILD_LIBSYSTEMD=ON -DSDBUSCPP_LIBSYSTEMD_VERSION=252 -DSDBUSCPP_GOOGLETEST_VERSION=1.14.0
6458
- name: make
6559
run: |
66-
cd build
67-
cmake --build . -j4
60+
cmake --build _build -j4
6861
- name: verify
6962
run: |
70-
cd build
71-
sudo cmake --build . --target install
63+
sudo cmake --build _build --target install
7264
ctest --output-on-failure
7365
- name: pack
7466
if: matrix.build == 'shared-libsystemd'
7567
run: |
76-
cd build
68+
cd _build
7769
cpack -G DEB
7870
- name: 'Upload Artifact'
7971
if: matrix.build == 'shared-libsystemd' && matrix.compiler == 'g++'
8072
uses: actions/upload-artifact@v4
8173
with:
8274
name: "debian-packages-${{ matrix.os }}-${{ matrix.compiler }}"
8375
path: |
84-
build/sdbus-c++*.deb
85-
build/sdbus-c++*.ddeb
76+
_build/sdbus-c++*.deb
77+
_build/sdbus-c++*.ddeb
8678
retention-days: 10
79+
static-analysis:
80+
name: static-analysis (ubuntu-24.04, clang-tidy, shared-libsystemd)
81+
runs-on: ubuntu-24.04
82+
strategy:
83+
fail-fast: false
84+
steps:
85+
- uses: actions/checkout@v4
86+
- name: install-deps
87+
run: |
88+
sudo apt-get update -y
89+
sudo apt-get install -y libsystemd-dev libgmock-dev clang
90+
sudo update-alternatives --remove-all cc
91+
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 10
92+
sudo update-alternatives --remove-all c++
93+
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 10
94+
- name: configure
95+
run: |
96+
cmake -B _build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-O0 -g" -DCMAKE_VERBOSE_MAKEFILE=ON -DSDBUSCPP_CLANG_TIDY=ON -DSDBUSCPP_BUILD_TESTS=ON -DSDBUSCPP_BUILD_PERF_TESTS=ON -DSDBUSCPP_BUILD_STRESS_TESTS=ON -DSDBUSCPP_BUILD_EXAMPLES=ON
97+
- name: make
98+
run: |
99+
cmake --build _build -j4
87100
freebsd-build:
88101
name: build (freebsd, clang/libc++, basu)
89102
runs-on: ubuntu-22.04 # until https://github.com/actions/runner/issues/385

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ option(SDBUSCPP_BUILD_DOCS "Build documentation for sdbus-c++" ON)
3535
if(SDBUSCPP_BUILD_DOCS)
3636
option(SDBUSCPP_BUILD_DOXYGEN_DOCS "Build doxygen documentation for sdbus-c++ API" OFF)
3737
endif()
38-
#option(SDBUSCPP_CLANG_TIDY "Co-compile with clang-tidy static analyzer" OFF)
38+
option(SDBUSCPP_CLANG_TIDY "Co-compile with clang-tidy static analyzer" OFF)
3939
#option(SDBUSCPP_COVERAGE "Build sdbus-c++ with code coverage instrumentation" OFF)
4040
# We promote the BUILD_SHARED_LIBS flag to a (global) option only if we are the main project
4141
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
@@ -130,6 +130,8 @@ endif()
130130

131131
find_package(Threads REQUIRED)
132132

133+
include(cmake/clang-tidy.cmake) # Static analysis with clang-tidy
134+
133135
#-------------------------------
134136
# SOURCE FILES CONFIGURATION
135137
#-------------------------------

cmake/clang-tidy.cmake

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#----------------------------------
2+
# STATIC ANALYSIS
3+
#----------------------------------
4+
5+
if(SDBUSCPP_CLANG_TIDY)
6+
message(STATUS "Building with static analysis")
7+
find_program(CLANG_TIDY NAMES clang-tidy)
8+
if(NOT CLANG_TIDY)
9+
message(WARNING "clang-tidy not found")
10+
else()
11+
message(STATUS "clang-tidy found: ${CLANG_TIDY}")
12+
set(DO_CLANG_TIDY "${CLANG_TIDY}")
13+
#set(DO_CLANG_TIDY "${CLANG_TIDY}" "-fix")
14+
set(CMAKE_CXX_CLANG_TIDY "${DO_CLANG_TIDY}")
15+
endif()
16+
endif()

examples/CMakeLists.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
# Building examples
22

3-
add_executable(obj-manager-server org.freedesktop.DBus.ObjectManager/obj-manager-server.cpp)
3+
set(OBJECTMANAGER_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.DBus.ObjectManager)
4+
set(OBJECTMANAGER_GENERATED_DIR ${OBJECTMANAGER_SOURCE_DIR}/dbus-api/gen-cpp)
5+
set(OBJECTMANAGER_SERVER_SRCS
6+
${OBJECTMANAGER_SOURCE_DIR}/obj-manager-server.cpp
7+
${OBJECTMANAGER_GENERATED_DIR}/examplemanager-planet1-server-glue.h)
8+
9+
add_executable(obj-manager-server ${OBJECTMANAGER_SERVER_SRCS})
10+
target_include_directories(obj-manager-server SYSTEM PRIVATE ${OBJECTMANAGER_GENERATED_DIR})
411
target_link_libraries(obj-manager-server sdbus-c++)
512

6-
add_executable(obj-manager-client org.freedesktop.DBus.ObjectManager/obj-manager-client.cpp)
13+
set(OBJECTMANAGER_CLIENT_SRCS
14+
${OBJECTMANAGER_SOURCE_DIR}/obj-manager-client.cpp
15+
${OBJECTMANAGER_GENERATED_DIR}/examplemanager-planet1-client-glue.h)
16+
17+
add_executable(obj-manager-client ${OBJECTMANAGER_CLIENT_SRCS})
18+
target_include_directories(obj-manager-client SYSTEM PRIVATE ${OBJECTMANAGER_GENERATED_DIR})
719
target_link_libraries(obj-manager-client sdbus-c++)
820

921
if(SDBUSCPP_INSTALL)

examples/org.freedesktop.DBus.ObjectManager/examplemanager-planet1-client-glue.h renamed to examples/org.freedesktop.DBus.ObjectManager/dbus-api/gen-cpp/examplemanager-planet1-client-glue.h

File renamed without changes.

examples/org.freedesktop.DBus.ObjectManager/examplemanager-planet1-server-glue.h renamed to examples/org.freedesktop.DBus.ObjectManager/dbus-api/gen-cpp/examplemanager-planet1-server-glue.h

File renamed without changes.

examples/org.freedesktop.DBus.ObjectManager/org.sdbuscpp.ExampleManager.Planet1.xml renamed to examples/org.freedesktop.DBus.ObjectManager/dbus-api/org.sdbuscpp.ExampleManager.Planet1.xml

File renamed without changes.

examples/org.freedesktop.DBus.ObjectManager/obj-manager-client.cpp

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,26 @@
1212
#include "examplemanager-planet1-client-glue.h"
1313
#include <sdbus-c++/sdbus-c++.h>
1414
#include <iostream>
15-
#include <thread>
15+
#include <utility>
16+
#include <map>
17+
#include <string>
18+
#include <vector>
19+
#include <memory>
1620

1721
class PlanetProxy final : public sdbus::ProxyInterfaces< org::sdbuscpp::ExampleManager::Planet1_proxy >
1822
{
1923
public:
2024
PlanetProxy(sdbus::IConnection& connection, sdbus::ServiceName destination, sdbus::ObjectPath path)
21-
: ProxyInterfaces(connection, std::move(destination), std::move(path))
25+
: ProxyInterfaces(connection, std::move(destination), std::move(path))
2226
{
2327
registerProxy();
2428
}
2529

30+
PlanetProxy(const PlanetProxy&) = delete;
31+
PlanetProxy& operator=(const PlanetProxy&) = delete;
32+
PlanetProxy(PlanetProxy&&) = delete;
33+
PlanetProxy& operator=(PlanetProxy&&) = delete;
34+
2635
~PlanetProxy()
2736
{
2837
unregisterProxy();
@@ -35,11 +44,16 @@ class ManagerProxy final : public sdbus::ProxyInterfaces<sdbus::ObjectManager_pr
3544
ManagerProxy(sdbus::IConnection& connection, sdbus::ServiceName destination, sdbus::ObjectPath path)
3645
: ProxyInterfaces(connection, destination, std::move(path))
3746
, m_connection(connection)
38-
, m_destination(destination)
47+
, m_destination(std::move(destination))
3948
{
4049
registerProxy();
4150
}
4251

52+
ManagerProxy(const ManagerProxy&) = delete;
53+
ManagerProxy& operator=(const ManagerProxy&) = delete;
54+
ManagerProxy(ManagerProxy&&) = delete;
55+
ManagerProxy& operator=(ManagerProxy&&) = delete;
56+
4357
~ManagerProxy()
4458
{
4559
unregisterProxy();
@@ -61,7 +75,7 @@ class ManagerProxy final : public sdbus::ProxyInterfaces<sdbus::ObjectManager_pr
6175
for (const auto& [interface, _] : interfacesAndProperties) {
6276
std::cout << interface << " ";
6377
}
64-
std::cout << std::endl;
78+
std::cout << '\n';
6579

6680
// Parse and print some more info
6781
auto planetInterface = interfacesAndProperties.find(sdbus::InterfaceName{org::sdbuscpp::ExampleManager::Planet1_proxy::INTERFACE_NAME});
@@ -73,7 +87,7 @@ class ManagerProxy final : public sdbus::ProxyInterfaces<sdbus::ObjectManager_pr
7387
const auto& name = properties.at(sdbus::PropertyName{"Name"}).get<std::string>();
7488
// or create a proxy instance to the newly added object.
7589
PlanetProxy planet(m_connection, m_destination, objectPath);
76-
std::cout << name << " has a population of " << planet.GetPopulation() << ".\n" << std::endl;
90+
std::cout << name << " has a population of " << planet.GetPopulation() << ".\n" << '\n';
7791
}
7892

7993
void onInterfacesRemoved( const sdbus::ObjectPath& objectPath
@@ -83,7 +97,7 @@ class ManagerProxy final : public sdbus::ProxyInterfaces<sdbus::ObjectManager_pr
8397
for (const auto& interface : interfaces) {
8498
std::cout << interface << " ";
8599
}
86-
std::cout << std::endl;
100+
std::cout << '\n';
87101
}
88102

89103
sdbus::IConnection& m_connection;
@@ -102,7 +116,7 @@ int main()
102116
}
103117
catch (const sdbus::Error& e) {
104118
if (e.getName() == "org.freedesktop.DBus.Error.ServiceUnknown") {
105-
std::cout << "Waiting for server to start ..." << std::endl;
119+
std::cout << "Waiting for server to start ..." << '\n';
106120
}
107121
}
108122

examples/org.freedesktop.DBus.ObjectManager/obj-manager-server.cpp

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
#include <memory>
1919
#include <thread>
2020
#include <chrono>
21-
22-
using sdbus::ObjectPath;
21+
#include <utility>
22+
#include <string>
23+
#include <cstdint>
2324

2425
class ManagerAdaptor : public sdbus::AdaptorInterfaces<sdbus::ObjectManager_adaptor>
2526
{
@@ -30,6 +31,11 @@ class ManagerAdaptor : public sdbus::AdaptorInterfaces<sdbus::ObjectManager_adap
3031
registerAdaptor();
3132
}
3233

34+
ManagerAdaptor(const ManagerAdaptor&) = delete;
35+
ManagerAdaptor& operator=(const ManagerAdaptor&) = delete;
36+
ManagerAdaptor(ManagerAdaptor&&) = delete;
37+
ManagerAdaptor& operator=(ManagerAdaptor&&) = delete;
38+
3339
~ManagerAdaptor()
3440
{
3541
unregisterAdaptor();
@@ -47,12 +53,17 @@ class PlanetAdaptor final : public sdbus::AdaptorInterfaces< org::sdbuscpp::Exam
4753
, m_population(population)
4854
{
4955
registerAdaptor();
50-
emitInterfacesAddedSignal({sdbus::InterfaceName{org::sdbuscpp::ExampleManager::Planet1_adaptor::INTERFACE_NAME}});
56+
emitInterfacesAddedSignal({sdbus::InterfaceName{Planet1_adaptor::INTERFACE_NAME}});
5157
}
5258

59+
PlanetAdaptor(const PlanetAdaptor&) = delete;
60+
PlanetAdaptor& operator=(const PlanetAdaptor&) = delete;
61+
PlanetAdaptor(PlanetAdaptor&&) = delete;
62+
PlanetAdaptor& operator=(PlanetAdaptor&&) = delete;
63+
5364
~PlanetAdaptor()
5465
{
55-
emitInterfacesRemovedSignal({sdbus::InterfaceName{org::sdbuscpp::ExampleManager::Planet1_adaptor::INTERFACE_NAME}});
66+
emitInterfacesRemovedSignal({sdbus::InterfaceName{Planet1_adaptor::INTERFACE_NAME}});
5667
unregisterAdaptor();
5768
}
5869

@@ -78,25 +89,26 @@ void printCountDown(const std::string& message, int seconds)
7889
std::this_thread::sleep_for(std::chrono::seconds(1));
7990
std::cout << i << " " << std::flush;
8091
}
81-
std::cout << std::endl;
92+
std::cout << '\n';
8293
}
8394

8495
int main()
8596
{
8697
auto connection = sdbus::createSessionBusConnection();
87-
sdbus::ServiceName serviceName{"org.sdbuscpp.examplemanager"};
98+
const sdbus::ServiceName serviceName{"org.sdbuscpp.examplemanager"};
8899
connection->requestName(serviceName);
89100
connection->enterEventLoopAsync();
90101

91-
auto manager = std::make_unique<ManagerAdaptor>(*connection, ObjectPath{"/org/sdbuscpp/examplemanager"});
102+
// NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores)
103+
auto manager = std::make_unique<ManagerAdaptor>(*connection, sdbus::ObjectPath{"/org/sdbuscpp/examplemanager"});
92104
while (true)
93105
{
94106
printCountDown("Creating PlanetAdaptor in ", 5);
95-
auto earth = std::make_unique<PlanetAdaptor>(*connection, ObjectPath{"/org/sdbuscpp/examplemanager/Planet1/Earth"}, "Earth", 7'874'965'825);
107+
auto earth = std::make_unique<PlanetAdaptor>(*connection, sdbus::ObjectPath{"/org/sdbuscpp/examplemanager/Planet1/Earth"}, "Earth", 7'874'965'825);
96108
printCountDown("Creating PlanetAdaptor in ", 5);
97-
auto trantor = std::make_unique<PlanetAdaptor>(*connection, ObjectPath{"/org/sdbuscpp/examplemanager/Planet1/Trantor"}, "Trantor", 40'000'000'000);
109+
auto trantor = std::make_unique<PlanetAdaptor>(*connection, sdbus::ObjectPath{"/org/sdbuscpp/examplemanager/Planet1/Trantor"}, "Trantor", 40'000'000'000);
98110
printCountDown("Creating PlanetAdaptor in ", 5);
99-
auto laconia = std::make_unique<PlanetAdaptor>(*connection, ObjectPath{"/org/sdbuscpp/examplemanager/Planet1/Laconia"}, "Laconia", 231'721);
111+
auto laconia = std::make_unique<PlanetAdaptor>(*connection, sdbus::ObjectPath{"/org/sdbuscpp/examplemanager/Planet1/Laconia"}, "Laconia", 231'721);
100112
printCountDown("Removing PlanetAdaptor in ", 5);
101113
earth.reset();
102114
printCountDown("Removing PlanetAdaptor in ", 5);

0 commit comments

Comments
 (0)