Skip to content

Commit 1cd9aa5

Browse files
committed
msg-filter: make filtering functions const
1 parent 80fdeb2 commit 1cd9aa5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/lib/msg-filter.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2011-2022 Red Hat, Inc.
2+
* Copyright (C) 2011-2023 Red Hat, Inc.
33
*
44
* This file is part of csdiff.
55
*
@@ -222,7 +222,7 @@ void MsgFilter::setFileNameSubstitution(
222222

223223
std::string MsgFilter::filterMsg(
224224
const std::string &msg,
225-
const std::string &checker)
225+
const std::string &checker) const
226226
{
227227
std::string filtered = msg;
228228
for (const MsgReplace &rpl : d->repList)
@@ -235,7 +235,7 @@ std::string MsgFilter::filterMsg(
235235
return filtered;
236236
}
237237

238-
std::string MsgFilter::filterPath(const std::string &origPath)
238+
std::string MsgFilter::filterPath(const std::string &origPath) const
239239
{
240240
std::string path = origPath;
241241

src/lib/msg-filter.hh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2011-2022 Red Hat, Inc.
2+
* Copyright (C) 2011-2023 Red Hat, Inc.
33
*
44
* This file is part of csdiff.
55
*
@@ -47,8 +47,8 @@ class MsgFilter {
4747

4848
std::string filterMsg(
4949
const std::string &msg,
50-
const std::string &checker);
51-
std::string filterPath(const std::string &path);
50+
const std::string &checker) const;
51+
std::string filterPath(const std::string &path) const;
5252

5353
private:
5454
MsgFilter();

0 commit comments

Comments
 (0)