mirror of
https://github.com/RGBCube/serenity
synced 2025-07-08 22:27:37 +00:00
![]() For example, consider cases where we want to propagate errors only in specific instances: auto result = read_data(); // something like ErrorOr<ByteBuffer> if (result.is_error() && result.error().code() != EINTR) continue; auto bytes = TRY(result); The TRY invocation will currently copy the byte buffer when the expression (in this case, just a local variable) is stored into _temporary_result. This patch binds the expression to a reference to prevent such copies. In less trival invocations (such as TRY(some_function()), this will incur only temporary lifetime extensions, i.e. no functional change. |
||
---|---|---|
.. | ||
Capabilities.cpp | ||
Capabilities.h | ||
Client.cpp | ||
Client.h | ||
ElementLocationStrategies.cpp | ||
ElementLocationStrategies.h | ||
Error.cpp | ||
Error.h | ||
ExecuteScript.cpp | ||
ExecuteScript.h | ||
Response.cpp | ||
Response.h | ||
Screenshot.cpp | ||
Screenshot.h | ||
TimeoutsConfiguration.cpp | ||
TimeoutsConfiguration.h |