chore: [gn] fix link errors relating to static members (#13488)

I'm not 100% sure why this is working in the gyp build, but I was getting link errors with these variables being defined in the headers.
This commit is contained in:
Jeremy Apthorp 2018-06-28 14:25:26 -07:00 committed by GitHub
parent d6af3bfcd2
commit 6492732631
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 3 deletions

View file

@ -39,6 +39,9 @@ HBITMAP CopyBitmap(HBITMAP bitmap) {
return ret;
}
const TCHAR DesktopNotificationController::class_name_[] =
TEXT("DesktopNotificationController");
HINSTANCE DesktopNotificationController::RegisterWndClasses() {
// We keep a static `module` variable which serves a dual purpose:
// 1. Stores the HINSTANCE where the window classes are registered,

View file

@ -76,8 +76,7 @@ class DesktopNotificationController {
void DestroyToast(ToastInstance& inst);
private:
static constexpr const TCHAR class_name_[] =
TEXT("DesktopNotificationController");
static const TCHAR class_name_[];
HWND hwnd_controller_ = NULL;
HFONT caption_font_ = NULL, body_font_ = NULL;

View file

@ -183,6 +183,9 @@ static HBITMAP StretchBitmap(HBITMAP bitmap, unsigned width, unsigned height) {
return result_bitmap;
}
const TCHAR DesktopNotificationController::Toast::class_name_[] =
TEXT("DesktopNotificationToast");
DesktopNotificationController::Toast::Toast(HWND hwnd,
shared_ptr<NotificationData>* data)
: hwnd_(hwnd), data_(*data) {

View file

@ -64,7 +64,7 @@ class DesktopNotificationController::Toast {
float AnimateStackCollapse();
private:
static constexpr const TCHAR class_name_[] = TEXT("DesktopNotificationToast");
static const TCHAR class_name_[];
const HWND hwnd_;
HDC hdc_;