From f5253185aa55a46cb3da80f66e7127a45c82052f Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 24 Feb 2013 13:15:53 +0100 Subject: cleaned up SymbolList class: make attributes private * they were logically private but still declared public so that initializer constructor functions could access them. * instead, now use friend classes * has the side effect that initializing priority can be declared using GCC's init_priority attribute which works with earlier compilers than the constructor (with priority) attribute --- src/symbols.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/symbols.h') diff --git a/src/symbols.h b/src/symbols.h index bb27d01..1e94e98 100644 --- a/src/symbols.h +++ b/src/symbols.h @@ -22,7 +22,6 @@ #include class SymbolList { -public: struct Entry { const gchar *name; gint value; @@ -30,8 +29,6 @@ public: const Entry *entries; gint size; - -private: int (*cmp_fnc)(const char *, const char *, size_t); /* for auto-completions */ @@ -53,6 +50,10 @@ public: gint lookup(const gchar *name, const gchar *prefix = ""); GList *get_glist(void); + + /* generated per Scintilla SymbolList */ + friend class SymbolListInitializer_scintilla; + friend class SymbolListInitializer_scilexer; }; namespace Symbols { -- cgit v1.2.3