summaryrefslogtreecommitdiffstats
path: root/RichString.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-01-05 23:42:55 +0100
committerBenBE <BenBE@geshi.org>2021-01-11 20:12:34 +0100
commitd72b0a682ecad0a8d5793022733447e855a61798 (patch)
treed9bc511bb716030fd73675bd3474e5a043636d73 /RichString.c
parent1b2d48bc9aa93254c48d10bb34acde9596b526b9 (diff)
Mark several non-modified pointer variables const
Diffstat (limited to 'RichString.c')
-rw-r--r--RichString.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/RichString.c b/RichString.c
index 01305806..ee06dce3 100644
--- a/RichString.c
+++ b/RichString.c
@@ -80,9 +80,9 @@ inline void RichString_setAttrn(RichString* this, int attrs, int start, int char
}
}
-int RichString_findChar(RichString* this, char c, int start) {
- wchar_t wc = btowc(c);
- cchar_t* ch = this->chptr + start;
+int RichString_findChar(const RichString* this, char c, int start) {
+ const wchar_t wc = btowc(c);
+ const cchar_t* ch = this->chptr + start;
for (int i = start; i < this->chlen; i++) {
if (ch->chars[0] == wc)
return i;
@@ -115,8 +115,8 @@ void RichString_setAttrn(RichString* this, int attrs, int start, int charcount)
}
}
-int RichString_findChar(RichString* this, char c, int start) {
- chtype* ch = this->chptr + start;
+int RichString_findChar(const RichString* this, char c, int start) {
+ const chtype* ch = this->chptr + start;
for (int i = start; i < this->chlen; i++) {
if ((*ch & 0xff) == (chtype) c)
return i;

© 2014-2024 Faster IT GmbH | imprint | privacy policy