refactor: add nodiscard attribute for some functions
This commit is contained in:
1 parent
24776f2047
commit
b65461c404
5 files changed
+17
-17
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user