You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before this change, byte_stream_writer::write (it's many implementations) would return a bool true/false if there was room in the stream for the data. The current implementation now generates an ASSERT when the available space check fails and would never return a false value from the function call.
This implementation basically changes the behavior from an interface that returned true/false and allowed the caller to handle the issue themselves to now forcing an ASSERT to occur.
I would suggest a few alternatives to preserve the original behavior and implement your newer functionality.
Move the ETL_ASSERT_FAIL into the write_unchecked function since the standard write functions are being checked already
create an additional function, for example write_with_exception(...) to implement the new functionality
provide either an optional parameter and/or implement a compile time switch that implements the exception behavior
The text was updated successfully, but these errors were encountered:
byte_stream.h changes in SHA 6a8cdf6892367deed444eadbed0288138ca5e301 change the API and break the expected behavior.
Before this change, byte_stream_writer::write (it's many implementations) would return a bool true/false if there was room in the stream for the data. The current implementation now generates an ASSERT when the available space check fails and would never return a false value from the function call.
This implementation basically changes the behavior from an interface that returned true/false and allowed the caller to handle the issue themselves to now forcing an ASSERT to occur.
I would suggest a few alternatives to preserve the original behavior and implement your newer functionality.
The text was updated successfully, but these errors were encountered: