From 46ba1bc40f110a52292290634eefd0c030677eea Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 11 Sep 2018 04:15:36 -0400 Subject: externals: Place font data within cpp files This places the font data within cpp files, which mitigates the possibility of the font data being duplicated within the binary if it's referred to in more than one translation unit in the future. It also stores the data within a std::array, which is more flexible when it comes to operating with the standard library. Furthermore, it makes the data arrays const. This is what we want, as it allows the compiler to store the data within the read-only segment. As it is, having several large sections of mutable data like this just leaves spots in memory that we can accidentally write to (via accidental overruns, what have you) and actually have it work. This ensures the font data remains the same no matter what. --- src/core/hle/service/ns/pl_u.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/service/ns/pl_u.cpp b/src/core/hle/service/ns/pl_u.cpp index 77f635ae2..7abb4cf00 100644 --- a/src/core/hle/service/ns/pl_u.cpp +++ b/src/core/hle/service/ns/pl_u.cpp @@ -2,12 +2,12 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "common/common_paths.h" #include "common/file_util.h" -- cgit v1.2.3