mirror of
https://github.com/love2d/megasource.git
synced 2026-08-20 04:30:45 +02:00
update OpenAL-Soft to 1.24.3.
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
#ifndef CORE_EXCEPT_H
|
||||
#define CORE_EXCEPT_H
|
||||
|
||||
#include <cstdarg>
|
||||
#include <exception>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
|
||||
|
||||
namespace al {
|
||||
@@ -12,20 +11,20 @@ namespace al {
|
||||
class base_exception : public std::exception {
|
||||
std::string mMessage;
|
||||
|
||||
protected:
|
||||
auto setMessage(const char *msg, std::va_list args) -> void;
|
||||
|
||||
public:
|
||||
base_exception() = default;
|
||||
template<typename T, std::enable_if_t<std::is_constructible_v<std::string,T>,bool> = true>
|
||||
explicit base_exception(T&& msg) : mMessage{std::forward<T>(msg)} { }
|
||||
base_exception(const base_exception&) = default;
|
||||
base_exception(base_exception&&) = default;
|
||||
~base_exception() override;
|
||||
|
||||
auto operator=(const base_exception&) -> base_exception& = default;
|
||||
auto operator=(base_exception&&) -> base_exception& = default;
|
||||
|
||||
[[nodiscard]] auto what() const noexcept -> const char* override { return mMessage.c_str(); }
|
||||
};
|
||||
|
||||
} // namespace al
|
||||
|
||||
#define START_API_FUNC try
|
||||
|
||||
#define END_API_FUNC catch(...) { std::terminate(); }
|
||||
|
||||
#endif /* CORE_EXCEPT_H */
|
||||
|
||||
Reference in New Issue
Block a user