galaxy
1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
PhysFSError.cpp
Go to the documentation of this file.
1
7
8
#include <physfs.h>
9
10
#include "
galaxy/logging/Log.hpp
"
11
12
#include "
PhysFSError.hpp
"
13
14
namespace
galaxy
15
{
16
namespace
logging
17
{
18
bool
physfs_check
(
const
int
code)
noexcept
19
{
20
if
(code == 0 || code == -1)
21
{
22
GALAXY_LOG
(
GALAXY_ERROR
,
"PHYSFS: {0}."
, PHYSFS_getLastError());
23
return
false
;
24
}
25
26
return
true
;
27
}
28
29
bool
physfs_check
(
void
* ptr)
noexcept
30
{
31
if
(!ptr)
32
{
33
GALAXY_LOG
(
GALAXY_ERROR
,
"PHYSFS: {0}."
, PHYSFS_getLastError());
34
return
false
;
35
}
36
37
return
true
;
38
}
39
}
// namespace logging
40
}
// namespace galaxy
Log.hpp
GALAXY_LOG
#define GALAXY_LOG(level, msg,...)
Definition
Log.hpp:29
GALAXY_ERROR
#define GALAXY_ERROR
Definition
Log.hpp:25
PhysFSError.hpp
galaxy::logging::physfs_check
bool physfs_check(const int code) noexcept
Call a physfs function with error handling and logs a message for you.
Definition
PhysFSError.cpp:18
galaxy
Timer.hpp galaxy.
Definition
Async.hpp:17
galaxy
src
galaxy
logging
PhysFSError.cpp
Generated on Sat Mar 1 2025 14:49:36 for galaxy by
1.12.0