From 72a134e4a1c48a4b6886824cc39adfa74e355c35 Mon Sep 17 00:00:00 2001
From: Mikhail Svechnikov <svechnikovmv@gmail.com>
Date: Fri, 4 Aug 2023 16:51:57 +0200
Subject: [PATCH] MakeScale: add GenericScale

---
 Base/Axis/MakeScale.cpp | 4 ++++
 Base/Axis/MakeScale.h   | 1 +
 2 files changed, 5 insertions(+)

diff --git a/Base/Axis/MakeScale.cpp b/Base/Axis/MakeScale.cpp
index c99f750ee47..5d5029ede87 100644
--- a/Base/Axis/MakeScale.cpp
+++ b/Base/Axis/MakeScale.cpp
@@ -49,6 +49,10 @@ std::vector<Bin1D> bounds2division(size_t N, double start, double end)
 
 } // namespace
 
+Scale GenericScale(const std::string& name, const std::vector<double>& limits)
+{
+    return Scale(name, limits2bins(limits));
+}
 
 Scale* newGenericScale(const std::string& name, const std::vector<double>& limits)
 {
diff --git a/Base/Axis/MakeScale.h b/Base/Axis/MakeScale.h
index 997addb8ca7..716efea5ef8 100644
--- a/Base/Axis/MakeScale.h
+++ b/Base/Axis/MakeScale.h
@@ -21,6 +21,7 @@
 
 class Scale;
 
+Scale GenericScale(const std::string& name, const std::vector<double>& limits);
 #ifndef SWIG
 Scale* newGenericScale(const std::string& name, const std::vector<double>& limits);
 #endif // SWIG
-- 
GitLab