From 2c4dd042df1518d67c117ced08c5a2f3729c3193 Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73@gmail.com>
Date: Tue, 30 Jan 2024 15:30:53 +0100
Subject: [PATCH] Possibly fix ODR violation in the transform tool strategies

BUG:480520


(cherry picked from commit e33c7d7d533d5289c3a37007f8cf574af5bc7102)
---
 plugins/tools/tool_transform2/kis_free_transform_strategy.cpp  | 2 ++
 .../tool_transform2/kis_perspective_transform_strategy.cpp     | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/plugins/tools/tool_transform2/kis_free_transform_strategy.cpp b/plugins/tools/tool_transform2/kis_free_transform_strategy.cpp
index 49486b6bd7c..8a63bce74e3 100644
--- a/plugins/tools/tool_transform2/kis_free_transform_strategy.cpp
+++ b/plugins/tools/tool_transform2/kis_free_transform_strategy.cpp
@@ -23,6 +23,7 @@
 #include "kis_algebra_2d.h"
 
 
+namespace {
 enum StrokeFunction {
     ROTATE = 0,
     MOVE,
@@ -41,6 +42,7 @@ enum StrokeFunction {
     MOVECENTER,
     PERSPECTIVE
 };
+}
 
 struct KisFreeTransformStrategy::Private
 {
diff --git a/plugins/tools/tool_transform2/kis_perspective_transform_strategy.cpp b/plugins/tools/tool_transform2/kis_perspective_transform_strategy.cpp
index ad1d9ffe4d3..bca5b51e13f 100644
--- a/plugins/tools/tool_transform2/kis_perspective_transform_strategy.cpp
+++ b/plugins/tools/tool_transform2/kis_perspective_transform_strategy.cpp
@@ -23,7 +23,7 @@
 #include "kis_transform_utils.h"
 #include "kis_free_transform_strategy_gsl_helpers.h"
 
-
+namespace {
 enum StrokeFunction {
     DRAG_HANDLE = 0,
     DRAG_X_VANISHING_POINT,
@@ -43,6 +43,7 @@ enum HandleIndexes {
     HANDLE_MIDDLE_RIGHT,
     HANDLE_COUNT,
 };
+}
 
 struct KisPerspectiveTransformStrategy::Private
 {
-- 
GitLab

