feat fix SLED_FROM_HERE
This commit is contained in:
parent
284bcf3972
commit
93ea3d11ef
@ -86,6 +86,7 @@ private:
|
||||
};
|
||||
|
||||
using MutexLock = LockGuard<Mutex>;
|
||||
using MutexGuard = LockGuard<Mutex>;
|
||||
using RecursiveMutexLock = LockGuard<RecursiveMutex>;
|
||||
|
||||
// class MutexLock final {
|
||||
|
@ -16,15 +16,20 @@ class Location final {
|
||||
public:
|
||||
Location() = delete;
|
||||
|
||||
Location(const char *file_name, int file_line, const char *function);
|
||||
static Location Current(const char *file_name = __builtin_FILE(),
|
||||
int file_line = __builtin_LINE(),
|
||||
const char *function = __builtin_FUNCTION());
|
||||
|
||||
std::string ToString() const;
|
||||
|
||||
private:
|
||||
Location(const char *file_name, int file_line, const char *function);
|
||||
const char *file() const { return file_name; };
|
||||
|
||||
int line() const { return file_line; };
|
||||
|
||||
const char *func() const { return function; };
|
||||
|
||||
private:
|
||||
const char *file_name;
|
||||
int file_line;
|
||||
const char *function;
|
||||
@ -32,6 +37,6 @@ private:
|
||||
|
||||
}// namespace sled
|
||||
|
||||
#define SLED_FROM_HERE sled::Location::Current();
|
||||
#define SLED_FROM_HERE sled::Location::Current()
|
||||
|
||||
#endif// SLED_SYSTEM_LOCATION_H
|
||||
|
Loading…
Reference in New Issue
Block a user