mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-14 03:14:23 +00:00
Fix some casting logic
This commit is contained in:
+353
-353
File diff suppressed because it is too large
Load Diff
+327
-327
File diff suppressed because one or more lines are too long
+338
-338
File diff suppressed because one or more lines are too long
+339
-339
File diff suppressed because one or more lines are too long
+352
-352
File diff suppressed because one or more lines are too long
+367
-367
File diff suppressed because one or more lines are too long
+357
-357
File diff suppressed because one or more lines are too long
+356
-356
File diff suppressed because one or more lines are too long
@@ -52,9 +52,7 @@ namespace IfcUtil {
|
||||
if (is_null(this)) {
|
||||
return static_cast<T*>(0);
|
||||
}
|
||||
return declaration().is(T::Class())
|
||||
? dynamic_cast<T*>(this)
|
||||
: static_cast<T*>(0);
|
||||
return dynamic_cast<T*>(this);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -62,9 +60,7 @@ namespace IfcUtil {
|
||||
if (is_null(this)) {
|
||||
return static_cast<const T*>(0);
|
||||
}
|
||||
return declaration().is(T::Class())
|
||||
? dynamic_cast<const T*>(this)
|
||||
: static_cast<const T*>(0);
|
||||
return dynamic_cast<const T*>(this);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user