From db67b8caaaa0065714d6c7c9c2b0ff1a0276c2a3 Mon Sep 17 00:00:00 2001 From: Laurent Pugin Date: Tue, 3 Sep 2024 12:53:02 +0200 Subject: [PATCH] Rename methods to avoid ambiguities [skip-ci] --- include/vrv/barline.h | 6 +++--- src/barline.cpp | 6 +++--- src/view_element.cpp | 4 ++-- src/view_page.cpp | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/vrv/barline.h b/include/vrv/barline.h index 3bb1c41a053..407c4ca4ac7 100644 --- a/include/vrv/barline.h +++ b/include/vrv/barline.h @@ -78,9 +78,9 @@ class BarLine : public LayerElement, * @return First entry is true if the attribute was found, second entry contains the value */ ///@{ - std::pair GetLength(const StaffDef *staffDef) const; - std::pair GetMethod(const StaffDef *staffDef) const; - std::pair GetPlace(const StaffDef *staffDef) const; + std::pair GetLengthFromContext(const StaffDef *staffDef) const; + std::pair GetMethodFromContext(const StaffDef *staffDef) const; + std::pair GetPlaceFromContext(const StaffDef *staffDef) const; ///@} //----------// diff --git a/src/barline.cpp b/src/barline.cpp index 9a7beea2900..8a5a6c81c87 100644 --- a/src/barline.cpp +++ b/src/barline.cpp @@ -95,7 +95,7 @@ bool BarLine::IsDrawnThrough(const StaffGrp *staffGrp) const return false; } -std::pair BarLine::GetLength(const StaffDef *staffDef) const +std::pair BarLine::GetLengthFromContext(const StaffDef *staffDef) const { // First check the parent measure const Measure *measure = dynamic_cast(this->GetParent()); @@ -120,7 +120,7 @@ std::pair BarLine::GetLength(const StaffDef *staffDef) const return { false, 0.0 }; } -std::pair BarLine::GetMethod(const StaffDef *staffDef) const +std::pair BarLine::GetMethodFromContext(const StaffDef *staffDef) const { // First check the parent measure const Measure *measure = dynamic_cast(this->GetParent()); @@ -145,7 +145,7 @@ std::pair BarLine::GetMethod(const StaffDef *staffDef) con return { false, BARMETHOD_NONE }; } -std::pair BarLine::GetPlace(const StaffDef *staffDef) const +std::pair BarLine::GetPlaceFromContext(const StaffDef *staffDef) const { // First check the parent measure const Measure *measure = dynamic_cast(this->GetParent()); diff --git a/src/view_element.cpp b/src/view_element.cpp index d14d3715d42..250400ac4bd 100644 --- a/src/view_element.cpp +++ b/src/view_element.cpp @@ -423,9 +423,9 @@ void View::DrawBarLine(DeviceContext *dc, LayerElement *element, Layer *layer, S StaffDef *drawingStaffDef = staff->m_drawingStaffDef; // Determine the method assert(drawingStaffDef); - auto [hasMethod, method] = barLine->GetMethod(drawingStaffDef); + auto [hasMethod, method] = barLine->GetMethodFromContext(drawingStaffDef); if (barLine->HasMethod()) { - method = barLine->AttBarLineVis::GetMethod(); + method = barLine->GetMethod(); } dc->StartGraphic(element, "", element->GetID()); diff --git a/src/view_page.cpp b/src/view_page.cpp index 626aa7f91e7..d8e7797b34a 100644 --- a/src/view_page.cpp +++ b/src/view_page.cpp @@ -772,7 +772,7 @@ void View::DrawBarLines(DeviceContext *dc, Measure *measure, StaffGrp *staffGrp, } // Determine the method - const auto [hasMethod, method] = barLine->GetMethod(staffDef); + const auto [hasMethod, method] = barLine->GetMethodFromContext(staffDef); const bool methodMensur = hasMethod && (method == BARMETHOD_mensur); const bool methodTakt = hasMethod && (method == BARMETHOD_takt); @@ -798,7 +798,7 @@ void View::DrawBarLines(DeviceContext *dc, Measure *measure, StaffGrp *staffGrp, // Adjust start and length if (!methodMensur && !methodTakt) { - const auto [hasPlace, place] = barLine->GetPlace(staffDef); + const auto [hasPlace, place] = barLine->GetPlaceFromContext(staffDef); if (hasPlace) { // bar.place counts upwards (note order). yBottom += place * unit; @@ -808,7 +808,7 @@ void View::DrawBarLines(DeviceContext *dc, Measure *measure, StaffGrp *staffGrp, yBottom -= 2 * unit; } - const auto [hasLength, length] = barLine->GetLength(staffDef); + const auto [hasLength, length] = barLine->GetLengthFromContext(staffDef); if (hasLength) { yLength = length * unit; }