diff options
author | Chris Robinson <[email protected]> | 2023-01-01 16:06:19 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-01-01 16:06:19 -0800 |
commit | 073f970788a35657537da1b1dc7c4af450888698 (patch) | |
tree | 96f9d5f5918d49f2243dedce525d98374fed22ae /alc/backends/pipewire.cpp | |
parent | cba526e1b082150f4a7160775f2ee6cb2deb024c (diff) |
Avoid some explicit casts and references
Diffstat (limited to 'alc/backends/pipewire.cpp')
-rw-r--r-- | alc/backends/pipewire.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp index 3b3a72c0..9fe19e64 100644 --- a/alc/backends/pipewire.cpp +++ b/alc/backends/pipewire.cpp @@ -367,7 +367,7 @@ using PwStreamPtr = std::unique_ptr<pw_stream,PwStreamDeleter>; /* Enums for bitflags... again... *sigh* */ constexpr pw_stream_flags operator|(pw_stream_flags lhs, pw_stream_flags rhs) noexcept -{ return static_cast<pw_stream_flags>(lhs | std::underlying_type_t<pw_stream_flags>{rhs}); } +{ return static_cast<pw_stream_flags>(lhs | al::to_underlying(rhs)); } class ThreadMainloop { pw_thread_loop *mLoop{}; @@ -608,7 +608,7 @@ DeviceNode *DeviceNode::Find(uint32_t id) { return n.mId == id; }; auto match = std::find_if(sList.begin(), sList.end(), match_id); - if(match != sList.end()) return std::addressof(*match); + if(match != sList.end()) return al::to_address(match); return nullptr; } @@ -862,10 +862,8 @@ void NodeProxy::infoCallback(const pw_node_info *info) NodeType ntype{}; if(al::strcasecmp(media_class, AudioSinkClass) == 0) ntype = NodeType::Sink; - else if( - al::strcasecmp(media_class, AudioSourceClass) == 0 - || al::strcasecmp(media_class, AudioSourceVirtualClass) == 0 - ) + else if(al::strcasecmp(media_class, AudioSourceClass) == 0 + || al::strcasecmp(media_class, AudioSourceVirtualClass) == 0) ntype = NodeType::Source; else if(al::strcasecmp(media_class, AudioDuplexClass) == 0) ntype = NodeType::Duplex; |