1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 20:05:07 +00:00

Demos: Use new format functions.

This commit is contained in:
asynts 2020-10-07 12:21:32 +02:00 committed by Andreas Kling
parent d781f3f6b5
commit 560c52989c
6 changed files with 34 additions and 45 deletions

View file

@ -63,12 +63,12 @@ int global_lib_variable = 1234;
void global_lib_function()
{
printf("Hello from Dynamic Lib! g_glob::m_i == %d\n", g_glob.get_i());
outln("Hello from Dynamic Lib! g_glob::m_i == {}", g_glob.get_i());
}
const char* other_lib_function(int my_argument)
{
dbgprintf("Hello from Dynamic Lib, now from the debug port! g_glob::m_i == %d\n", g_glob.get_i());
dbgln("Hello from Dynamic Lib, now from the debug port! g_glob::m_i == {}", g_glob.get_i());
int sum = my_argument + global_lib_variable;
@ -77,7 +77,7 @@ const char* other_lib_function(int my_argument)
// the malloc of the main program which would be what they call 'very crash'.
// Feels very Windows :)
static String s_string;
s_string = String::format("Here's your string! Sum of argument and global_lib_variable: %d", sum);
s_string = String::formatted("Here's your string! Sum of argument and global_lib_variable: {}", sum);
return s_string.characters();
}
}