From 18e1d449c052963af828557b41060ce8a7be776f Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 4 Sep 2024 03:45:26 +0300 Subject: [PATCH] make follow argument linked const --- src/app/browser/main/tab/page/navbar/history.cpp | 12 ++++++------ src/app/browser/main/tab/page/navbar/history.hpp | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/app/browser/main/tab/page/navbar/history.cpp b/src/app/browser/main/tab/page/navbar/history.cpp index 45e1060c..94283db1 100644 --- a/src/app/browser/main/tab/page/navbar/history.cpp +++ b/src/app/browser/main/tab/page/navbar/history.cpp @@ -26,7 +26,7 @@ History::History() // Actions bool History::try_back( Memory & match, - bool follow + const bool & FOLLOW ) { try { @@ -34,7 +34,7 @@ bool History::try_back( index - 1 ); - if (follow) + if (FOLLOW) { index--; } @@ -50,7 +50,7 @@ bool History::try_back( bool History::try_forward( Memory & match, - bool follow + const bool & FOLLOW ) { try { @@ -58,7 +58,7 @@ bool History::try_forward( index + 1 ); - if (follow) + if (FOLLOW) { index++; } @@ -74,7 +74,7 @@ bool History::try_forward( void History::push( const Glib::ustring & REQUEST, - bool follow + const bool & FOLLOW ) { if (memory.empty() || memory.back().request != REQUEST) { @@ -88,7 +88,7 @@ void History::push( } ); - if (follow) + if (FOLLOW) { index = memory.size(); } diff --git a/src/app/browser/main/tab/page/navbar/history.hpp b/src/app/browser/main/tab/page/navbar/history.hpp index 31ef4398..0add0079 100644 --- a/src/app/browser/main/tab/page/navbar/history.hpp +++ b/src/app/browser/main/tab/page/navbar/history.hpp @@ -42,17 +42,17 @@ namespace app::browser::main::tab::page::navbar // Actions bool try_back( Memory & match, - bool follow = true + const bool & FOLLOW = true ); bool try_forward( Memory & match, - bool follow = true + const bool & FOLLOW = true ); void push( const Glib::ustring & REQUEST, - bool follow = true + const bool & FOLLOW = true ); void refresh();