mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-09 22:02:10 +02:00
Add missing const qualifiers to member functions
This commit is contained in:
+7
-6
@@ -38,7 +38,7 @@ class DefaultDataConverter {
|
||||
virtual EventPayload read(const int /*opcode*/,
|
||||
const int /*index*/,
|
||||
const intptr_t /*value*/,
|
||||
const void* data) {
|
||||
const void* data) const {
|
||||
if (!data) {
|
||||
return nullptr;
|
||||
}
|
||||
@@ -60,8 +60,9 @@ class DefaultDataConverter {
|
||||
* can be serialized and conveys the meaning of the event. This is only used
|
||||
* for the `effSetSpeakerArrangement` and `effGetSpeakerArrangement` events.
|
||||
*/
|
||||
virtual std::optional<EventPayload> read_value(const int /*opcode*/,
|
||||
const intptr_t /*value*/) {
|
||||
virtual std::optional<EventPayload> read_value(
|
||||
const int /*opcode*/,
|
||||
const intptr_t /*value*/) const {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
@@ -70,7 +71,7 @@ class DefaultDataConverter {
|
||||
*/
|
||||
virtual void write(const int /*opcode*/,
|
||||
void* data,
|
||||
const EventResult& response) {
|
||||
const EventResult& response) const {
|
||||
// The default behavior is to handle this as a null terminated C-style
|
||||
// string
|
||||
std::visit(overload{[&](const auto&) {},
|
||||
@@ -92,7 +93,7 @@ class DefaultDataConverter {
|
||||
*/
|
||||
virtual void write_value(const int /*opcode*/,
|
||||
intptr_t /*value*/,
|
||||
const EventResult& /*response*/) {}
|
||||
const EventResult& /*response*/) const {}
|
||||
|
||||
/**
|
||||
* This function can override a callback's return value based on the opcode.
|
||||
@@ -104,7 +105,7 @@ class DefaultDataConverter {
|
||||
* function.
|
||||
*/
|
||||
virtual intptr_t return_value(const int /*opcode*/,
|
||||
const intptr_t original) {
|
||||
const intptr_t original) const {
|
||||
return original;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -297,7 +297,7 @@ void Logger::log_event_response(
|
||||
}
|
||||
}
|
||||
|
||||
bool Logger::should_filter_event(bool is_dispatch, int opcode) {
|
||||
bool Logger::should_filter_event(bool is_dispatch, int opcode) const {
|
||||
if (verbosity >= Verbosity::all_events) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ class Logger {
|
||||
* Determine whether an event should be filtered based on the current
|
||||
* verbosity level.
|
||||
*/
|
||||
bool should_filter_event(bool is_dispatch, int opcode);
|
||||
bool should_filter_event(bool is_dispatch, int opcode) const;
|
||||
|
||||
/**
|
||||
* The output stream to write the log messages to. Typically either STDERR
|
||||
|
||||
Reference in New Issue
Block a user