mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 10:46:55 +00:00
Use nih_debug_assert_failure!() in derive macros
Instead of nih_log!(). These messages won't appear in release builds.
This commit is contained in:
@@ -174,7 +174,11 @@ pub fn derive_params(input: TokenStream) -> TokenStream {
|
||||
serialized.insert(String::from(#persist_key), data);
|
||||
}
|
||||
Err(err) => {
|
||||
::nih_plug::nih_log!("Could not serialize '{}': {}", #persist_key, err)
|
||||
::nih_plug::nih_debug_assert_failure!(
|
||||
"Could not serialize '{}': {}",
|
||||
#persist_key,
|
||||
err
|
||||
)
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -188,7 +192,7 @@ pub fn derive_params(input: TokenStream) -> TokenStream {
|
||||
);
|
||||
}
|
||||
Err(err) => {
|
||||
::nih_plug::nih_log!(
|
||||
::nih_plug::nih_debug_assert_failure!(
|
||||
"Could not deserialize '{}': {}",
|
||||
#persist_key,
|
||||
err
|
||||
@@ -267,7 +271,7 @@ pub fn derive_params(input: TokenStream) -> TokenStream {
|
||||
for (field_name, data) in serialized {
|
||||
match field_name.as_str() {
|
||||
#(#field_deserialize_tokens)*
|
||||
_ => ::nih_plug::nih_log!("Unknown serialized field name: {} (this may not be accurate)", field_name),
|
||||
_ => ::nih_plug::nih_debug_assert_failure!("Unknown serialized field name: {} (this may not be accurate)", field_name),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user