mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 10:09:14 +00:00
Everywhere: Convert from_string_view -> from_string_literal where static
This commit is contained in:
parent
37e0f7b381
commit
229b64a4b7
Notes:
github-actions[bot]
2024-09-11 09:59:55 +00:00
Author: https://github.com/asutoshvariar 🔰
Commit: 229b64a4b7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/457
26 changed files with 80 additions and 80 deletions
|
@ -1825,16 +1825,16 @@ ErrorOr<ByteString> current_executable_path()
|
|||
for (int32 cookie { 0 }; get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK && info.type != B_APP_IMAGE;)
|
||||
;
|
||||
if (info.type != B_APP_IMAGE)
|
||||
return Error::from_string_view("current_executable_path() failed"sv);
|
||||
return Error::from_string_literal("current_executable_path() failed");
|
||||
if (sizeof(info.name) > sizeof(path))
|
||||
return Error::from_errno(ENAMETOOLONG);
|
||||
strlcpy(path, info.name, sizeof(path) - 1);
|
||||
#elif defined(AK_OS_EMSCRIPTEN)
|
||||
return Error::from_string_view("current_executable_path() unknown on this platform"sv);
|
||||
return Error::from_string_literal("current_executable_path() unknown on this platform");
|
||||
#else
|
||||
# warning "Not sure how to get current_executable_path on this platform!"
|
||||
// GetModuleFileName on Windows, unsure about OpenBSD.
|
||||
return Error::from_string_view("current_executable_path unknown"sv);
|
||||
return Error::from_string_literal("current_executable_path unknown");
|
||||
#endif
|
||||
path[sizeof(path) - 1] = '\0';
|
||||
return ByteString { path, strlen(path) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue