diff options
author | Neil <nyamatongwe@gmail.com> | 2025-03-09 10:43:53 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2025-03-09 10:43:53 +1100 |
commit | fba60a84ae848ce661fefa7e7bb31754fe889b7b (patch) | |
tree | 92ff18e7c5063e2d6ea89a7d63da0700fed49d9e /win32/PlatWin.cxx | |
parent | 5ff135d684cb71abec848a98e96557554a0911e3 (diff) | |
download | scintilla-mirror-fba60a84ae848ce661fefa7e7bb31754fe889b7b.tar.gz |
Avoid warnings by replacing &[0] with .data(), adding [[nodiscard]], replacing
typedef with using, and initialising at declaration.
Diffstat (limited to 'win32/PlatWin.cxx')
-rw-r--r-- | win32/PlatWin.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 37c33d6ed..7598f9447 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -100,9 +100,9 @@ void LoadD2DOnce() noexcept { } } - typedef HRESULT (WINAPI *D2D1CFSig)(D2D1_FACTORY_TYPE factoryType, REFIID riid, + using D2D1CFSig = HRESULT (WINAPI *)(D2D1_FACTORY_TYPE factoryType, REFIID riid, CONST D2D1_FACTORY_OPTIONS *pFactoryOptions, IUnknown **factory); - typedef HRESULT (WINAPI *DWriteCFSig)(DWRITE_FACTORY_TYPE factoryType, REFIID iid, + using DWriteCFSig = HRESULT (WINAPI *)(DWRITE_FACTORY_TYPE factoryType, REFIID iid, IUnknown **factory); hDLLD2D = ::LoadLibraryEx(TEXT("D2D1.DLL"), {}, loadLibraryFlags); @@ -3212,7 +3212,7 @@ public: char *SetWords(const char *s) { words = std::vector<char>(s, s+strlen(s)+1); - return &words[0]; + return words.data(); } }; |