diff options
author | nyamatongwe <devnull@localhost> | 2011-03-30 11:46:19 +1100 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2011-03-30 11:46:19 +1100 |
commit | 90a0a223fbf30b8e4cdc1d1686518c8b6a4723da (patch) | |
tree | 149f8a9cc3608d14f5e85b5d74d381c385ee98ca /src/Style.cxx | |
parent | 19c81d8b5587ea4ee147f86c614575cffcf8b4cb (diff) | |
download | scintilla-mirror-90a0a223fbf30b8e4cdc1d1686518c8b6a4723da.tar.gz |
Encapsulate the aliasing of Font IDs.
Diffstat (limited to 'src/Style.cxx')
-rw-r--r-- | src/Style.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Style.cxx b/src/Style.cxx index b86884aa5..25efcd6e8 100644 --- a/src/Style.cxx +++ b/src/Style.cxx @@ -24,6 +24,10 @@ FontAlias::~FontAlias() { // ~Font will not release the actual font resource sine it is now 0 } +void FontAlias::MakeAlias(Font &fontOrigin) { + SetID(fontOrigin.GetID()); +} + void FontAlias::ClearFont() { SetID(0); } @@ -137,7 +141,7 @@ void Style::ClearTo(const Style &source) { } void Style::Copy(Font &font_, const FontMeasurements &fm_) { - font.SetID(font_.GetID()); + font.MakeAlias(font_); (FontMeasurements &)(*this) = fm_; #if PLAT_WX ascent = surface.Ascent(font); |