mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-25 18:18:49 -04:00
uncrustify libraries/AP_Common/AP_MetaClass.h
This commit is contained in:
parent
05ff8d51c9
commit
3e37a14e6f
@ -108,7 +108,7 @@ public:
|
||||
/// @return An opaque handle
|
||||
///
|
||||
Meta_handle meta_get_handle(void) const {
|
||||
return ((Meta_handle)meta_type_id() << 16) | (uintptr_t)this;
|
||||
return ((Meta_handle)meta_type_id() << 16) | (uintptr_t) this;
|
||||
}
|
||||
|
||||
/// Validates an AP_Meta_class handle.
|
||||
@ -123,8 +123,8 @@ public:
|
||||
/// @return The instance pointer if the handle is good,
|
||||
/// or NULL if it is bad.
|
||||
///
|
||||
static AP_Meta_class *meta_validate_handle(Meta_handle handle) {
|
||||
AP_Meta_class *candidate = (AP_Meta_class *)(handle & 0xffff); // extract object pointer
|
||||
static AP_Meta_class * meta_validate_handle(Meta_handle handle) {
|
||||
AP_Meta_class * candidate = (AP_Meta_class *)(handle & 0xffff); // extract object pointer
|
||||
uint16_t id = handle >> 16; // and claimed type
|
||||
|
||||
// Sanity-check the pointer to ensure it lies within the device RAM, so that
|
||||
@ -190,7 +190,7 @@ public:
|
||||
/// @return NULL if p is not of precisely type T, otherwise p cast to T.
|
||||
///
|
||||
template<typename T>
|
||||
static T *meta_cast(AP_Meta_class *p) {
|
||||
static T * meta_cast(AP_Meta_class *p) {
|
||||
T tmp;
|
||||
if (meta_type_equivalent(p, &tmp)) {
|
||||
return (T *)p;
|
||||
@ -206,7 +206,7 @@ public:
|
||||
/// @return NULL if this is not of precisely type T, otherwise this cast to T.
|
||||
///
|
||||
template<typename T>
|
||||
T *meta_cast(void) {
|
||||
T * meta_cast(void) {
|
||||
T tmp;
|
||||
if (meta_type_equivalent(this, &tmp)) {
|
||||
return (T*)this;
|
||||
|
Loading…
Reference in New Issue
Block a user