forked from quickshell/quickshell
lint: remove reinterpret_cast lint
Unhelpful.
This commit is contained in:
parent
be5e5fc4a5
commit
3fc1c914c7
15 changed files with 41 additions and 72 deletions
|
@ -42,9 +42,7 @@ template <typename T>
|
|||
class PwObject {
|
||||
public:
|
||||
explicit PwObject(T* object = nullptr): object(object) {}
|
||||
~PwObject() {
|
||||
pw_proxy_destroy(reinterpret_cast<pw_proxy*>(this->object)); // NOLINT
|
||||
}
|
||||
~PwObject() { pw_proxy_destroy(reinterpret_cast<pw_proxy*>(this->object)); }
|
||||
|
||||
Q_DISABLE_COPY_MOVE(PwObject);
|
||||
|
||||
|
|
|
@ -459,19 +459,19 @@ PwVolumeProps PwVolumeProps::parseSpaPod(const spa_pod* param) {
|
|||
const auto* channelsProp = spa_pod_find_prop(param, nullptr, SPA_PROP_channelMap);
|
||||
const auto* muteProp = spa_pod_find_prop(param, nullptr, SPA_PROP_mute);
|
||||
|
||||
const auto* volumes = reinterpret_cast<const spa_pod_array*>(&volumesProp->value); // NOLINT
|
||||
const auto* channels = reinterpret_cast<const spa_pod_array*>(&channelsProp->value); // NOLINT
|
||||
const auto* volumes = reinterpret_cast<const spa_pod_array*>(&volumesProp->value);
|
||||
const auto* channels = reinterpret_cast<const spa_pod_array*>(&channelsProp->value);
|
||||
|
||||
spa_pod* iter = nullptr;
|
||||
SPA_POD_ARRAY_FOREACH(volumes, iter) {
|
||||
// Cubing behavior found in MPD source, and appears to corrospond to everyone else's measurements correctly.
|
||||
auto linear = *reinterpret_cast<float*>(iter); // NOLINT
|
||||
auto linear = *reinterpret_cast<float*>(iter);
|
||||
auto visual = std::cbrt(linear);
|
||||
props.volumes.push_back(visual);
|
||||
}
|
||||
|
||||
SPA_POD_ARRAY_FOREACH(channels, iter) {
|
||||
props.channels.push_back(*reinterpret_cast<PwAudioChannel::Enum*>(iter)); // NOLINT
|
||||
props.channels.push_back(*reinterpret_cast<PwAudioChannel::Enum*>(iter));
|
||||
}
|
||||
|
||||
spa_pod_get_bool(&muteProp->value, &props.mute);
|
||||
|
|
|
@ -67,9 +67,7 @@ QDebug operator<<(QDebug debug, const PwBindableObject* object);
|
|||
template <typename T, StringLiteral INTERFACE, quint32 VERSION>
|
||||
class PwBindable: public PwBindableObject {
|
||||
public:
|
||||
T* proxy() {
|
||||
return reinterpret_cast<T*>(this->object); // NOLINT
|
||||
}
|
||||
T* proxy() { return reinterpret_cast<T*>(this->object); }
|
||||
|
||||
protected:
|
||||
void bind() override {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue