diff options
author | Neil <nyamatongwe@gmail.com> | 2021-03-17 14:58:11 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-03-17 14:58:11 +1100 |
commit | 1b5dd62b71d8d9b657b0cd7c138c9dc523a07cc4 (patch) | |
tree | f25f7353ad23c041da607b07b5ddd247214ba90c /cocoa/QuartzTextLayout.h | |
parent | 7fbe52f835688967a6079582ed8839cb55d0f9ea (diff) | |
download | scintilla-mirror-1b5dd62b71d8d9b657b0cd7c138c9dc523a07cc4.tar.gz |
Change Font to an interface and stop using FontID. Fonts are shared and
reference counted using std::shared_ptr. This optimizes memory and reduces
potential for allocation bugs.
Diffstat (limited to 'cocoa/QuartzTextLayout.h')
-rw-r--r-- | cocoa/QuartzTextLayout.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cocoa/QuartzTextLayout.h b/cocoa/QuartzTextLayout.h index 0c6eb08dd..0c234fe39 100644 --- a/cocoa/QuartzTextLayout.h +++ b/cocoa/QuartzTextLayout.h @@ -33,7 +33,7 @@ public: } } - CFStringEncoding setText(std::string_view sv, CFStringEncoding encoding, const QuartzTextStyle &r) { + CFStringEncoding setText(std::string_view sv, CFStringEncoding encoding, const QuartzTextStyle *r) { // First clear current values in case of failure. if (mString) { CFRelease(mString); @@ -58,7 +58,7 @@ public: stringLength = CFStringGetLength(str); - CFMutableDictionaryRef stringAttribs = r.getCTStyle(); + CFMutableDictionaryRef stringAttribs = r->getCTStyle(); mString = ::CFAttributedStringCreate(NULL, str, stringAttribs); |