format: reformat project

Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
Vyacheslav Ivanov
2024-08-03 19:53:48 +03:00
committed by Pugemon
parent 736cd175d5
commit bbf33e8e4d
202 changed files with 7389 additions and 5609 deletions
+29 -23
View File
@@ -1,12 +1,12 @@
#include "alutil.hpp"
#include "../../debug/Logger.hpp"
#include <fstream>
#include <cstring>
#include <fstream>
#include <memory>
#include <type_traits>
#include "../../debug/Logger.hpp"
#ifdef __APPLE__
#include <OpenAL/al.h>
#include <OpenAL/alc.h>
@@ -17,28 +17,34 @@
static debug::Logger logger("open-al");
bool AL::check_errors(const std::string& filename, const std::uint_fast32_t line){
bool AL::check_errors(
const std::string& filename, const std::uint_fast32_t line
) {
ALenum error = alGetError();
if(error != AL_NO_ERROR){
if (error != AL_NO_ERROR) {
logger.error() << filename << ": " << line;
switch(error){
case AL_INVALID_NAME:
logger.error() << "a bad name (ID) was passed to an OpenAL function";
break;
case AL_INVALID_ENUM:
logger.error() << "an invalid enum value was passed to an OpenAL function";
break;
case AL_INVALID_VALUE:
logger.error() << "an invalid value was passed to an OpenAL function";
break;
case AL_INVALID_OPERATION:
logger.error() << "the requested operation is not valid";
break;
case AL_OUT_OF_MEMORY:
logger.error() << "the requested operation resulted in OpenAL running out of memory";
break;
default:
logger.error() << "UNKNOWN AL ERROR: " << error;
switch (error) {
case AL_INVALID_NAME:
logger.error()
<< "a bad name (ID) was passed to an OpenAL function";
break;
case AL_INVALID_ENUM:
logger.error()
<< "an invalid enum value was passed to an OpenAL function";
break;
case AL_INVALID_VALUE:
logger.error()
<< "an invalid value was passed to an OpenAL function";
break;
case AL_INVALID_OPERATION:
logger.error() << "the requested operation is not valid";
break;
case AL_OUT_OF_MEMORY:
logger.error() << "the requested operation resulted in OpenAL "
"running out of memory";
break;
default:
logger.error() << "UNKNOWN AL ERROR: " << error;
}
return false;
}