mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
Everywhere: Use CMake to generate AK/Debug.h.
This was done with the help of several scripts, I dump them here to easily find them later: awk '/#ifdef/ { print "#cmakedefine01 "$2 }' AK/Debug.h.in for debug_macro in $(awk '/#ifdef/ { print $2 }' AK/Debug.h.in) do find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/#ifdef '$debug_macro'/#if '$debug_macro'/' {} \; done # Remember to remove WRAPPER_GERNERATOR_DEBUG from the list. awk '/#cmake/ { print "set("$2" ON)" }' AK/Debug.h.in
This commit is contained in:
parent
76f2918416
commit
1a3a0836c0
59 changed files with 475 additions and 459 deletions
|
@ -94,7 +94,7 @@ void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, const HashMap
|
|||
|
||||
auto content_type = headers.get("Content-Type");
|
||||
if (content_type.has_value()) {
|
||||
#ifdef RESOURCE_DEBUG
|
||||
#if RESOURCE_DEBUG
|
||||
dbgln("Content-Type header: '{}'", content_type.value());
|
||||
#endif
|
||||
m_encoding = encoding_from_content_type(content_type.value());
|
||||
|
@ -104,7 +104,7 @@ void Resource::did_load(Badge<ResourceLoader>, ReadonlyBytes data, const HashMap
|
|||
m_encoding = "utf-8"; // FIXME: This doesn't seem nice.
|
||||
m_mime_type = url().data_mime_type();
|
||||
} else {
|
||||
#ifdef RESOURCE_DEBUG
|
||||
#if RESOURCE_DEBUG
|
||||
dbgln("No Content-Type header to go on! Guessing based on filename...");
|
||||
#endif
|
||||
m_encoding = "utf-8"; // FIXME: This doesn't seem nice.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue