1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

UserspaceEmulator: Replace printf usages with format.

This replaces almost all usages. Some have to remain because 'outf'
always appends a newline. (It inherits this behaviour from LogStream.)
This commit is contained in:
asynts 2020-09-30 15:30:42 +02:00 committed by Andreas Kling
parent fb7a94c959
commit ba3488a6d5
6 changed files with 67 additions and 69 deletions

View file

@ -24,6 +24,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <AK/Format.h>
#include <AK/Platform.h>
#pragma once
@ -160,3 +161,11 @@ inline void ValueAndShadowReference<T>::operator=(const ValueWithShadow<T>& othe
}
}
template<typename T>
struct AK::Formatter<UserspaceEmulator::ValueWithShadow<T>> : AK::Formatter<T> {
void format(StringBuilder& builder, UserspaceEmulator::ValueWithShadow<T> value, FormatterContext& context)
{
return Formatter<T>::format(builder, value.value(), context);
}
};