mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
make follow argument linked const
This commit is contained in:
parent
03f0eeaf9b
commit
18e1d449c0
2 changed files with 9 additions and 9 deletions
|
|
@ -26,7 +26,7 @@ History::History()
|
||||||
// Actions
|
// Actions
|
||||||
bool History::try_back(
|
bool History::try_back(
|
||||||
Memory & match,
|
Memory & match,
|
||||||
bool follow
|
const bool & FOLLOW
|
||||||
) {
|
) {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -34,7 +34,7 @@ bool History::try_back(
|
||||||
index - 1
|
index - 1
|
||||||
);
|
);
|
||||||
|
|
||||||
if (follow)
|
if (FOLLOW)
|
||||||
{
|
{
|
||||||
index--;
|
index--;
|
||||||
}
|
}
|
||||||
|
|
@ -50,7 +50,7 @@ bool History::try_back(
|
||||||
|
|
||||||
bool History::try_forward(
|
bool History::try_forward(
|
||||||
Memory & match,
|
Memory & match,
|
||||||
bool follow
|
const bool & FOLLOW
|
||||||
) {
|
) {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -58,7 +58,7 @@ bool History::try_forward(
|
||||||
index + 1
|
index + 1
|
||||||
);
|
);
|
||||||
|
|
||||||
if (follow)
|
if (FOLLOW)
|
||||||
{
|
{
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
@ -74,7 +74,7 @@ bool History::try_forward(
|
||||||
|
|
||||||
void History::push(
|
void History::push(
|
||||||
const Glib::ustring & REQUEST,
|
const Glib::ustring & REQUEST,
|
||||||
bool follow
|
const bool & FOLLOW
|
||||||
) {
|
) {
|
||||||
if (memory.empty() || memory.back().request != REQUEST)
|
if (memory.empty() || memory.back().request != REQUEST)
|
||||||
{
|
{
|
||||||
|
|
@ -88,7 +88,7 @@ void History::push(
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (follow)
|
if (FOLLOW)
|
||||||
{
|
{
|
||||||
index = memory.size();
|
index = memory.size();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,17 +42,17 @@ namespace app::browser::main::tab::page::navbar
|
||||||
// Actions
|
// Actions
|
||||||
bool try_back(
|
bool try_back(
|
||||||
Memory & match,
|
Memory & match,
|
||||||
bool follow = true
|
const bool & FOLLOW = true
|
||||||
);
|
);
|
||||||
|
|
||||||
bool try_forward(
|
bool try_forward(
|
||||||
Memory & match,
|
Memory & match,
|
||||||
bool follow = true
|
const bool & FOLLOW = true
|
||||||
);
|
);
|
||||||
|
|
||||||
void push(
|
void push(
|
||||||
const Glib::ustring & REQUEST,
|
const Glib::ustring & REQUEST,
|
||||||
bool follow = true
|
const bool & FOLLOW = true
|
||||||
);
|
);
|
||||||
|
|
||||||
void refresh();
|
void refresh();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue