refactor: add nodiscard attribute for some functions

This commit is contained in:
Stanislav Angelovic authored and Stanislav Angelovič committed 2024-04-24 20:20:29 +02:00
1 parent 24776f2047
commit b65461c404
5 files changed
+17 -17

No files matched your search

+2 -2
View File
@@ -57,7 +57,7 @@ namespace sdbus {
object_.addVTable(std::move(interfaceName), std::move(vtable_));
}
inline Slot VTableAdder::forInterface(std::string interfaceName, return_slot_t)
[[nodiscard]] inline Slot VTableAdder::forInterface(std::string interfaceName, return_slot_t)
{
return object_.addVTable(std::move(interfaceName), std::move(vtable_), return_slot);
}
@@ -311,7 +311,7 @@ namespace sdbus {
}
template <typename _Function>
inline Slot SignalSubscriber::call(_Function&& callback, return_slot_t)
[[nodiscard]] inline Slot SignalSubscriber::call(_Function&& callback, return_slot_t)
{
assert(!interfaceName_.empty()); // onInterface() must be placed/called prior to this function