Skip to content

Commit 8d33220

Browse files
committed
fix: address other clang-tidy suggestions
1 parent 32e73a2 commit 8d33220

18 files changed

+48
-48
lines changed

include/sdbus-c++/AdaptorInterfaces.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ namespace sdbus {
126126
}
127127

128128
/*!
129-
* @brief Unregisters adaptors's API and removes it from the bus
129+
* @brief Unregisters adaptor's API and removes it from the bus
130130
*
131131
* This function must be called in the destructor of the final adaptor class that implements AdaptorInterfaces.
132132
*

include/sdbus-c++/IConnection.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ namespace sdbus {
9292
virtual void leaveEventLoop() = 0;
9393

9494
/*!
95-
* @brief Attaches the bus connection to an sd-event event loop
95+
* @brief Attaches the bus connection to a sd-event event loop
9696
*
9797
* @param[in] event sd-event event loop object
9898
* @param[in] priority Specified priority
@@ -104,7 +104,7 @@ namespace sdbus {
104104
virtual void attachSdEventLoop(sd_event *event, int priority = 0) = 0;
105105

106106
/*!
107-
* @brief Detaches the bus connection from an sd-event event loop
107+
* @brief Detaches the bus connection from a sd-event event loop
108108
*
109109
* @throws sdbus::Error in case of failure
110110
*/
@@ -144,7 +144,7 @@ namespace sdbus {
144144
* in a form that can be passed to poll(2).
145145
*
146146
* The bus connection conveniently integrates sd-event event loop.
147-
* To attach the bus connection to an sd-event event loop, use
147+
* To attach the bus connection to a sd-event event loop, use
148148
* attachSdEventLoop() function.
149149
*
150150
* @throws sdbus::Error in case of failure
@@ -168,7 +168,7 @@ namespace sdbus {
168168
* You don't need to directly call this method or getEventLoopPollData() method
169169
* when using convenient, internal bus connection event loops through
170170
* enterEventLoop() or enterEventLoopAsync() calls, or when the bus is
171-
* connected to an sd-event event loop through attachSdEventLoop().
171+
* connected to a sd-event event loop through attachSdEventLoop().
172172
* It is invoked automatically when necessary.
173173
*
174174
* @throws sdbus::Error in case of failure

include/sdbus-c++/IProxy.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,6 @@ namespace sdbus {
557557
* @brief Calls method on the D-Bus object asynchronously
558558
*
559559
* @param[in] message Message representing an async method call
560-
* @param[in] Tag denoting a std::future-based overload
561560
* @return Future object providing access to the future method reply message
562561
*
563562
* This is a std::future-based way of asynchronously calling a remote D-Bus method.
@@ -579,7 +578,6 @@ namespace sdbus {
579578
*
580579
* @param[in] message Message representing an async method call
581580
* @param[in] timeout Method call timeout
582-
* @param[in] Tag denoting a std::future-based overload
583581
* @return Future object providing access to the future method reply message
584582
*
585583
* This is a std::future-based way of asynchronously calling a remote D-Bus method.

include/sdbus-c++/ProxyInterfaces.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030
#include <sdbus-c++/IProxy.h>
3131
#include <cassert>
32-
#include <string>
3332
#include <memory>
3433

3534
// Forward declarations
@@ -215,4 +214,4 @@ namespace sdbus {
215214

216215
} // namespace sdbus
217216

218-
#endif /* SDBUS_CXX_INTERFACES_H_ */
217+
#endif /* SDBUS_CXX_PROXYINTERFACES_H_ */

include/sdbus-c++/StandardInterfaces.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,8 @@ namespace sdbus {
458458
* will extend the resulting object adaptor with emitInterfacesAddedSignal()/emitInterfacesRemovedSignal()
459459
* according to org.freedesktop.DBus.ObjectManager.InterfacesAdded/.InterfacesRemoved.
460460
*
461-
* Note that objects which implement this adaptor require an object manager (e.g via ObjectManager_adaptor) to be
462-
* instantiated on one of it's parent object paths or the same path. InterfacesAdded/InterfacesRemoved
461+
* Note that objects which implement this adaptor require an object manager (e.g., via ObjectManager_adaptor) to be
462+
* instantiated on one of its parent object paths or the same path. InterfacesAdded/InterfacesRemoved
463463
* signals are sent from the closest object manager at either the same path or the closest parent path of an object.
464464
*/
465465
class ManagedObject_adaptor

include/sdbus-c++/TypeTraits.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ namespace sdbus {
351351
#endif
352352

353353
template <typename Enum> // is_const_v and is_volatile_v to avoid ambiguity conflicts with const and volatile specializations of signature_of
354-
struct signature_of<Enum, typename std::enable_if_t<std::is_enum_v<Enum> && !std::is_const_v<Enum> && !std::is_volatile_v<Enum>>>
354+
struct signature_of<Enum, std::enable_if_t<std::is_enum_v<Enum> && !std::is_const_v<Enum> && !std::is_volatile_v<Enum>>>
355355
: signature_of<std::underlying_type_t<Enum>>
356356
{};
357357

@@ -665,7 +665,7 @@ namespace sdbus {
665665
{
666666
return detail::apply_impl( std::forward<Function>(fun)
667667
, std::forward<Tuple>(tuple)
668-
, std::make_index_sequence<std::tuple_size<std::decay_t<Tuple>>::value>{} );
668+
, std::make_index_sequence<std::tuple_size_v<std::decay_t<Tuple>>>{} );
669669
}
670670

671671
// Convert tuple `t' of values into a list of arguments
@@ -676,7 +676,7 @@ namespace sdbus {
676676
return detail::apply_impl( std::forward<Function>(fun)
677677
, std::move(res)
678678
, std::forward<Tuple>(tuple)
679-
, std::make_index_sequence<std::tuple_size<std::decay_t<Tuple>>::value>{} );
679+
, std::make_index_sequence<std::tuple_size_v<std::decay_t<Tuple>>>{} );
680680
}
681681

682682
// Convert tuple `t' of values into a list of arguments
@@ -687,7 +687,7 @@ namespace sdbus {
687687
return detail::apply_impl( std::forward<Function>(fun)
688688
, std::move(err)
689689
, std::forward<Tuple>(tuple)
690-
, std::make_index_sequence<std::tuple_size<std::decay_t<Tuple>>::value>{} );
690+
, std::make_index_sequence<std::tuple_size_v<std::decay_t<Tuple>>>{} );
691691
}
692692

693693
// Convenient concatenation of arrays

include/sdbus-c++/Types.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#include <string>
3737
#include <tuple>
3838
#include <type_traits>
39-
#include <typeinfo>
4039
#include <utility>
4140

4241
namespace sdbus {
@@ -50,7 +49,7 @@ namespace sdbus {
5049
* Some const methods are conceptually const, but not physically const,
5150
* thus are not thread-safe. This is by design: normally, clients
5251
* should process a single Variant object in a single thread at a time.
53-
* Otherwise they need to take care of synchronization by themselves.
52+
* Otherwise, they need to take care of synchronization by themselves.
5453
*
5554
***********************************************/
5655
class Variant
@@ -188,7 +187,7 @@ namespace sdbus {
188187
constexpr Struct<std::decay_t<Elements>...>
189188
make_struct(Elements&&... args)
190189
{
191-
typedef Struct<std::decay_t<Elements>...> result_type;
190+
using result_type = Struct<std::decay_t<Elements>...>;
192191
return result_type(std::forward<Elements>(args)...);
193192
}
194193

include/sdbus-c++/VTableItems.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ namespace sdbus {
189189
inline PropertyVTableItem& PropertyVTableItem::withGetter(Function&& callback)
190190
{
191191
static_assert(function_argument_count_v<Function> == 0, "Property getter function must not take any arguments");
192-
static_assert(!std::is_void<function_result_t<Function>>::value, "Property getter function must return property value");
192+
static_assert(!std::is_void_v<function_result_t<Function>>, "Property getter function must return property value");
193193

194194
if (signature.empty())
195195
signature = signature_of_function_output_arguments_v<Function>;
@@ -207,7 +207,7 @@ namespace sdbus {
207207
inline PropertyVTableItem& PropertyVTableItem::withSetter(Function&& callback)
208208
{
209209
static_assert(function_argument_count_v<Function> == 1, "Property setter function must take one parameter - the property value");
210-
static_assert(std::is_void<function_result_t<Function>>::value, "Property setter function must not return any value");
210+
static_assert(std::is_void_v<function_result_t<Function>>, "Property setter function must not return any value");
211211

212212
if (signature.empty())
213213
signature = signature_of_function_input_arguments_v<Function>;

src/Connection.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333

3434
#include "IConnection.h"
3535
#include "ISdBus.h"
36-
#include "ScopeGuard.h"
3736

3837
#include <memory>
3938
#include <string>

src/IConnection.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@
3131

3232
#include "sdbus-c++/TypeTraits.h"
3333

34-
#include <functional>
3534
#include <memory>
36-
#include <string>
3735
#include SDBUS_HEADER
3836
#include <vector>
3937

0 commit comments

Comments
 (0)