From 8d4e03d3e827540d1f60e96091c0c71973910ff5 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Thu, 16 May 2024 21:49:11 +1000 Subject: Feature [feature-requests:#1516]. Access SpecialRepresentations through a unique_ptr. Reduces executable size. --- src/Editor.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 12076e003..f27c19aa5 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -217,7 +217,7 @@ void Editor::Finalise() { } void Editor::SetRepresentations() { - reprs.SetDefaultRepresentations(pdoc->dbcsCodePage); + reprs->SetDefaultRepresentations(pdoc->dbcsCodePage); } void Editor::DropGraphics() noexcept { @@ -8436,11 +8436,11 @@ sptr_t Editor::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) { return vs.controlCharSymbol; case Message::SetRepresentation: - reprs.SetRepresentation(ConstCharPtrFromUPtr(wParam), ConstCharPtrFromSPtr(lParam)); + reprs->SetRepresentation(ConstCharPtrFromUPtr(wParam), ConstCharPtrFromSPtr(lParam)); break; case Message::GetRepresentation: { - const Representation *repr = reprs.RepresentationFromCharacter( + const Representation *repr = reprs->RepresentationFromCharacter( ConstCharPtrFromUPtr(wParam)); if (repr) { return StringResult(lParam, repr->stringRep.c_str()); @@ -8449,7 +8449,7 @@ sptr_t Editor::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) { } case Message::ClearRepresentation: - reprs.ClearRepresentation(ConstCharPtrFromUPtr(wParam)); + reprs->ClearRepresentation(ConstCharPtrFromUPtr(wParam)); break; case Message::ClearAllRepresentations: @@ -8457,11 +8457,11 @@ sptr_t Editor::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) { break; case Message::SetRepresentationAppearance: - reprs.SetRepresentationAppearance(ConstCharPtrFromUPtr(wParam), static_cast(lParam)); + reprs->SetRepresentationAppearance(ConstCharPtrFromUPtr(wParam), static_cast(lParam)); break; case Message::GetRepresentationAppearance: { - const Representation *repr = reprs.RepresentationFromCharacter( + const Representation *repr = reprs->RepresentationFromCharacter( ConstCharPtrFromUPtr(wParam)); if (repr) { return static_cast(repr->appearance); @@ -8469,11 +8469,11 @@ sptr_t Editor::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) { return 0; } case Message::SetRepresentationColour: - reprs.SetRepresentationColour(ConstCharPtrFromUPtr(wParam), ColourRGBA(static_cast(lParam))); + reprs->SetRepresentationColour(ConstCharPtrFromUPtr(wParam), ColourRGBA(static_cast(lParam))); break; case Message::GetRepresentationColour: { - const Representation *repr = reprs.RepresentationFromCharacter( + const Representation *repr = reprs->RepresentationFromCharacter( ConstCharPtrFromUPtr(wParam)); if (repr) { return repr->colour.AsInteger(); -- cgit v1.2.3