[gjs: 3/7] object: Make GjsListLink const-correct
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 3/7] object: Make GjsListLink const-correct
- Date: Mon, 11 Jun 2018 01:10:06 +0000 (UTC)
commit e3dc2f44defd5ac11e7b5c01f0792b3954a2e4ad
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Jun 3 23:16:22 2018 -0700
object: Make GjsListLink const-correct
gi/object.cpp | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index 11c3dd42..119382ce 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -64,12 +64,12 @@ class GjsListLink {
ObjectInstance *m_next;
public:
- ObjectInstance *prev(void) { return m_prev; }
- ObjectInstance *next(void) { return m_next; }
+ ObjectInstance *prev(void) const { return m_prev; }
+ ObjectInstance *next(void) const { return m_next; }
void prepend(ObjectInstance *this_instance, ObjectInstance *head);
void unlink(void);
- size_t size(void);
+ size_t size(void) const;
};
struct AutoGValueVector : public std::vector<GValue> {
@@ -214,9 +214,9 @@ GjsListLink::unlink(void)
}
size_t
-GjsListLink::size(void)
+GjsListLink::size(void) const
{
- GjsListLink *elem = this;
+ const GjsListLink *elem = this;
size_t count = 0;
do {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]