Refactor tsensor
This commit is contained in:
@@ -49,6 +49,7 @@ extern "C" {
|
||||
#include "hocclk/config.h"
|
||||
#include "hocclk/errors.h"
|
||||
#include "hocclk/psm_ext.h"
|
||||
#include "hocclk/result.hpp"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
11
Source/hoc-clk/common/include/hocclk/result.hpp
Normal file
11
Source/hoc-clk/common/include/hocclk/result.hpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
#include <switch.h>
|
||||
|
||||
#define R_UNLESS(rc) \
|
||||
do { \
|
||||
if (R_FAILED(rc)) { \
|
||||
return; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* TODO: Add more Result macros. */
|
||||
Reference in New Issue
Block a user