aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-06-18 23:04:24 -0700
committerChris Robinson <[email protected]>2019-06-18 23:04:24 -0700
commit723ab7f15a4bdaa7dd26a8a672057cb0c901f36a (patch)
treeea4fdb32190bfd518a226e7bc711ba35db2d2926 /Alc
parent0fa984027c37e6ae9f5acbfd013cba5ba90ea9aa (diff)
Don't inline ifstream destructor
Diffstat (limited to 'Alc')
-rw-r--r--Alc/compat.h2
-rw-r--r--Alc/helpers.cpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/Alc/compat.h b/Alc/compat.h
index 2e0ad1e7..4ffc40bf 100644
--- a/Alc/compat.h
+++ b/Alc/compat.h
@@ -76,10 +76,10 @@ public:
ifstream(const wchar_t *filename, std::ios_base::openmode mode = std::ios_base::in);
ifstream(const std::wstring &filename, std::ios_base::openmode mode = std::ios_base::in)
: ifstream(filename.c_str(), mode) { }
-
ifstream(const char *filename, std::ios_base::openmode mode = std::ios_base::in);
ifstream(const std::string &filename, std::ios_base::openmode mode = std::ios_base::in)
: ifstream(filename.c_str(), mode) { }
+ ~ifstream() override;
bool is_open() const noexcept { return mStreamBuf.is_open(); }
};
diff --git a/Alc/helpers.cpp b/Alc/helpers.cpp
index 3efa989d..ee0bb2dc 100644
--- a/Alc/helpers.cpp
+++ b/Alc/helpers.cpp
@@ -424,6 +424,12 @@ ifstream::ifstream(const char *filename, std::ios_base::openmode mode)
clear(failbit);
}
+/* This is only here to ensure the compiler doesn't define an implicit
+ * destructor, which it tries to automatically inline and subsequently complain
+ * it can't inline without excessive code growth.
+ */
+ifstream::~ifstream() { }
+
} // namespace al
const PathNamePair &GetProcBinary()