aboutsummaryrefslogtreecommitdiffstats
path: root/al/event.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-05-23 02:32:39 -0700
committerChris Robinson <[email protected]>2023-05-23 02:32:39 -0700
commit7f72f83fcb3d463d4e5db5d393fff8606f0e2763 (patch)
tree76cd9a40b83bca44f2dc931857df4cd483862ec5 /al/event.cpp
parent85c82693e89a76f17257a2ef8256ca22e5192289 (diff)
Use a string_view for handling debug messages
Diffstat (limited to 'al/event.cpp')
-rw-r--r--al/event.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/al/event.cpp b/al/event.cpp
index f606f765..7bd5ae1b 100644
--- a/al/event.cpp
+++ b/al/event.cpp
@@ -121,7 +121,7 @@ int EventThread(ALCcontext *context)
const std::string_view message{evt.msg};
context->debugMessage(DebugSource::System, DebugType::Error, 0,
- DebugSeverity::High, static_cast<ALsizei>(message.length()), message.data());
+ DebugSeverity::High, message);
if(context->mEventCb
&& enabledevts.test(al::to_underlying(AsyncEnableBits::Disconnected)))
@@ -130,9 +130,8 @@ int EventThread(ALCcontext *context)
context->mEventParam);
};
- std::visit(overloaded
- {proc_srcstate, proc_buffercomp, proc_release, proc_disconnect, proc_killthread},
- event);
+ std::visit(overloaded{proc_srcstate, proc_buffercomp, proc_release, proc_disconnect,
+ proc_killthread}, event);
} while(evt_data.len != 0);
}
return 0;