Add raw API for custom syntax.
This commit is contained in:
@@ -164,14 +164,8 @@ impl Engine {
|
||||
#[cfg(not(feature = "no_object"))]
|
||||
#[inline(always)]
|
||||
pub fn register_type_with_name<T: Variant + Clone>(&mut self, name: &str) -> &mut Self {
|
||||
if self.type_names.is_none() {
|
||||
self.type_names = Some(Default::default());
|
||||
}
|
||||
// Add the pretty-print type name into the map
|
||||
self.type_names
|
||||
.as_mut()
|
||||
.unwrap()
|
||||
.insert(type_name::<T>().into(), name.into());
|
||||
self.type_names.insert(type_name::<T>().into(), name.into());
|
||||
self
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user