[DiscordArchive] is using `#if` in Config.cpp okay or is it better to create a custom function somewhere else to keep
[DiscordArchive] is using `#if` in Config.cpp okay or is it better to create a custom function somewhere else to keep
Archived author: Tondorian • Posted: 2025-01-29T11:25:19.350000+00:00
Original source
is using `#if` in Config.cpp okay or is it better to create a custom function somewhere else to keep the code clean?
Archived author: Tondorian • Posted: 2025-01-29T11:25:44.535000+00:00
Original source
`Config.cpp` line 40
Archived author: Tondorian • Posted: 2025-01-29T11:26:07.827000+00:00
Original source
it is a call into boost
Archived author: walkline • Posted: 2025-01-29T12:15:56.110000+00:00
Original source
I'd create a wrapper function and put the #if inside it to handle platform-specific stuff. But yeah, I'd keep that function inside the config test.
As for the wstring thing, that's weird, maybe just another platform quirk? Seems to work fine on linux/macos
Archived author: Tondorian • Posted: 2025-01-29T12:20:28.339000+00:00
Original source
yes the wstring thing is most likely because of the multibyte charset my project uses on windows
Archived author: Tondorian • Posted: 2025-01-29T12:23:10.652000+00:00
Original source
https://learn.microsoft.com/en-us/cpp/bu...w=msvc-170 maybe this could be a solution https://stackoverflow.com/questions/4769...thout-a-bo
but I am not sure if this will break the code in some cases
[Embed: /utf-8 (Set source and execution character sets to UTF-8)]
Learn more about: `/utf-8` (Set source and execution character sets to UTF-8)
https://learn.microsoft.com/en-us/cpp/bu...w=msvc-170
[Embed: Possible to force CMake/MSVC to use UTF-8 encoding for source files...]
All our source code is valid UTF-8, however some users on Windows cannot build them because their system is configured for a different encoding.
Without adding a BOM to source files, is it possibl...
https://stackoverflow.com/questions/4769...thout-a-bo