[latexila] Fix warning with static not applicable to constants
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Fix warning with static not applicable to constants
- Date: Fri, 21 Oct 2016 17:58:09 +0000 (UTC)
commit 23d800240e5424b0ab1288fe228713ecfe4eecc1
Author: Sébastien Wilmet <swilmet gnome org>
Date: Fri Oct 21 19:54:45 2016 +0200
Fix warning with static not applicable to constants
Vala now warns about this construct:
warning: the modifier `static' is not applicable to constants
And indeed it makes sense to use only const.
src/document_structure.vala | 8 ++++----
src/document_view.vala | 8 ++++----
src/most_used_symbols.vala | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/document_structure.vala b/src/document_structure.vala
index cf3d75b..679a09c 100644
--- a/src/document_structure.vala
+++ b/src/document_structure.vala
@@ -35,7 +35,7 @@ public class DocumentStructure : GLib.Object
private unowned Document _doc;
private int _nb_marks = 0;
- private static const string MARK_NAME_PREFIX = "struct_item_";
+ private const string MARK_NAME_PREFIX = "struct_item_";
private TextMark? _end_document_mark = null;
private StructureModel _model = null;
@@ -50,11 +50,11 @@ public class DocumentStructure : GLib.Object
// Only captions, TODOs and FIXMEs are truncated if needed, because the other
// items are normally short enough.
- private static const int ITEM_MAX_LENGTH = 60;
+ private const int ITEM_MAX_LENGTH = 60;
- private static const int MAX_NB_LINES_TO_PARSE = 2000;
+ private const int MAX_NB_LINES_TO_PARSE = 2000;
private int _start_parsing_line = 0;
- private static const bool _measure_parsing_time = false;
+ private const bool _measure_parsing_time = false;
private Timer _timer = null;
private static string[] _section_names = null;
diff --git a/src/document_view.vala b/src/document_view.vala
index 7752704..d2ddbab 100644
--- a/src/document_view.vala
+++ b/src/document_view.vala
@@ -23,12 +23,12 @@ public class DocumentView : Gtk.SourceView
{
public const double SCROLL_MARGIN = 0.02;
- private static const string METADATA_ATTRIBUTE_SPELL_LANGUAGE =
+ private const string METADATA_ATTRIBUTE_SPELL_LANGUAGE =
"metadata::latexila-spell-language";
- private static const string METADATA_ATTRIBUTE_INLINE_SPELL =
+ private const string METADATA_ATTRIBUTE_INLINE_SPELL =
"metadata::latexila-inline-spell";
- private static const string INLINE_SPELL_ENABLED_STR = "1";
- private static const string INLINE_SPELL_DISABLED_STR = "0";
+ private const string INLINE_SPELL_ENABLED_STR = "1";
+ private const string INLINE_SPELL_DISABLED_STR = "0";
private GLib.Settings _editor_settings;
private Pango.FontDescription _font_desc;
diff --git a/src/most_used_symbols.vala b/src/most_used_symbols.vala
index 3dcceed..98dc079 100644
--- a/src/most_used_symbols.vala
+++ b/src/most_used_symbols.vala
@@ -28,7 +28,7 @@ public class MostUsedSymbols : GLib.Object
private Gtk.ListStore _store;
// The column containing the number of times a symbol has been used.
- private static const int SYMBOL_COLUMN_NUM = SymbolColumn.N_COLUMNS;
+ private const int SYMBOL_COLUMN_NUM = SymbolColumn.N_COLUMNS;
private MostUsedSymbols ()
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]