aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-04-14 11:50:59 -0700
committerChris Robinson <[email protected]>2020-04-14 11:50:59 -0700
commit6ac581635406328f50a3552aeddd0b95790594ef (patch)
treecb88fdba037090df00d8c248e80bdd37ec169017 /al
parent7f81eec1a6266f41e40eb4ec3f8933a238a5343e (diff)
Avoid inlining some potentially costly calls
Diffstat (limited to 'al')
-rw-r--r--al/effect.cpp9
-rw-r--r--al/filter.cpp2
2 files changed, 10 insertions, 1 deletions
diff --git a/al/effect.cpp b/al/effect.cpp
index 3324228a..cb29ae8b 100644
--- a/al/effect.cpp
+++ b/al/effect.cpp
@@ -70,6 +70,15 @@ const EffectList gEffectList[15]{
bool DisabledEffects[MAX_EFFECTS];
+
+effect_exception::effect_exception(ALenum code, const char *msg, ...) : base_exception{code}
+{
+ std::va_list args;
+ va_start(args, msg);
+ setMessage(msg, args);
+ va_end(args);
+}
+
namespace {
constexpr struct FactoryItem {
diff --git a/al/filter.cpp b/al/filter.cpp
index a861c8cd..8d24b87d 100644
--- a/al/filter.cpp
+++ b/al/filter.cpp
@@ -52,7 +52,7 @@ public:
[[gnu::format(printf, 3, 4)]]
filter_exception(ALenum code, const char *msg, ...) : base_exception{code}
{
- va_list args;
+ std::va_list args;
va_start(args, msg);
setMessage(msg, args);
va_end(args);