comparison src/sys/osx/dark_theme.cc @ 196:f0ff06a45c42

date: use std::optional for values
author Paper <mrpapersonic@gmail.com>
date Thu, 07 Dec 2023 16:28:11 -0500
parents 975a3f0965e2
children 862d0d8619f6
comparison
equal deleted inserted replaced
195:975a3f0965e2 196:f0ff06a45c42
46 46
47 if (!NSAppearanceNameAqua || !NSAppearanceNameDarkAqua) 47 if (!NSAppearanceNameAqua || !NSAppearanceNameDarkAqua)
48 if (!RetrieveAppearanceNames()) 48 if (!RetrieveAppearanceNames())
49 return false; 49 return false;
50 50
51 // NSArray* array = @[NSAppearanceNameAqua, NSAppearanceNameDarkAqua];
51 CFArrayRef array = []() -> CFArrayRef { 52 CFArrayRef array = []() -> CFArrayRef {
52 CFStringRef refs[] = {NSAppearanceNameAqua, NSAppearanceNameDarkAqua}; 53 CFStringRef refs[] = {NSAppearanceNameAqua, NSAppearanceNameDarkAqua};
53 return CFArrayCreate(NULL, reinterpret_cast<const void**>(refs), 2, &kCFTypeArrayCallBacks); 54 return CFArrayCreate(NULL, reinterpret_cast<const void**>(refs), 2, &kCFTypeArrayCallBacks);
54 }(); 55 }();
55 56