Commit 02d60aa
Fix compile time warnings
Changed files (22)
modifiedlibbirdfont/BirdFontFile.valamodifiedlibbirdfont/EditPoint.valamodifiedlibbirdfont/Expander.valamodifiedlibbirdfont/FileChooser.valamodifiedlibbirdfont/FileDialogTab.valamodifiedlibbirdfont/KeyBindings.valamodifiedlibbirdfont/LicenseDialog.valamodifiedlibbirdfont/Line.valamodifiedlibbirdfont/NativeWindow.valamodifiedlibbirdfont/OpenFontFormat/CffTable.valamodifiedlibbirdfont/OpenFontFormat/GlyfTable.valamodifiedlibbirdfont/OpenFontFormat/KernTable.valamodifiedlibbirdfont/OpenFontFormat/NameTable.valamodifiedlibbirdfont/OpenFontFormat/Os2Table.valamodifiedlibbirdfont/OtfFeatureTable.valamodifiedlibbirdfont/OverwriteDialog.valamodifiedlibbirdfont/QuestionDialog.valamodifiedlibbirdfont/Renderer/TextArea.valamodifiedlibbirdfont/Row.valamodifiedlibbirdfont/SaveDialog.valamodifiedlibbirdfont/TabBar.valamodifiedlibbirdfont/TabContent.vala
Diff
@@ -23,11 +23,11 @@ class BirdFontFile : GLib.Object { Font font; - public static const int FORMAT_MAJOR = 2;- public static const int FORMAT_MINOR = 2;+ public const int FORMAT_MAJOR = 2;+ public const int FORMAT_MINOR = 2; - public static const int MIN_FORMAT_MAJOR = 0;- public static const int MIN_FORMAT_MINOR = 0;+ public const int MIN_FORMAT_MAJOR = 0;+ public const int MIN_FORMAT_MINOR = 0; public bool has_svg_glyphs = false; @@ -38,26 +38,26 @@ public class EditPoint : GLib.Object { public unowned EditPoint? prev = null; public unowned EditPoint? next = null; - public static const uint NONE = 0;- public static const uint ACTIVE = 1;- public static const uint SELECTED = 1 << 1;- public static const uint DELETED_POINT = 1 << 2;- public static const uint TIE = 1 << 3;- public static const uint REFLECTIVE = 1 << 4;+ public const uint NONE = 0;+ public const uint ACTIVE = 1;+ public const uint SELECTED = 1 << 1;+ public const uint DELETED_POINT = 1 << 2;+ public const uint TIE = 1 << 3;+ public const uint REFLECTIVE = 1 << 4; - public static const uint INTERSECTION = 1 << 5;- public static const uint NEW_CORNER = 1 << 6;- public static const uint STROKE_OFFSET = 1 << 7;- public static const uint COUNTER_TO_OUTLINE = 1 << 8;- public static const uint COPIED = 1 << 9;- public static const uint REMOVE_PART = 1 << 10;- public static const uint OVERLAY = 1 << 11;- public static const uint CURVE = 1 << 12;- public static const uint CURVE_KEEP = 1 << 13;- public static const uint SEGMENT_END = 1 << 14;- public static const uint SPLIT_POINT = 1 << 15;- public static const uint SELF_INTERSECTION = 1 << 16;- public static const uint COPIED_SELF_INTERSECTION = 1 << 17;+ public const uint INTERSECTION = 1 << 5;+ public const uint NEW_CORNER = 1 << 6;+ public const uint STROKE_OFFSET = 1 << 7;+ public const uint COUNTER_TO_OUTLINE = 1 << 8;+ public const uint COPIED = 1 << 9;+ public const uint REMOVE_PART = 1 << 10;+ public const uint OVERLAY = 1 << 11;+ public const uint CURVE = 1 << 12;+ public const uint CURVE_KEEP = 1 << 13;+ public const uint SEGMENT_END = 1 << 14;+ public const uint SPLIT_POINT = 1 << 15;+ public const uint SELF_INTERSECTION = 1 << 16;+ public const uint COPIED_SELF_INTERSECTION = 1 << 17; public uint flags = NONE; @@ -19,7 +19,7 @@ namespace BirdFont { public class Expander : GLib.Object { - private static const double HEADLINE_MARGIN = 4;+ private const double HEADLINE_MARGIN = 4; public double x = 7; public double y = 5;@@ -16,10 +16,10 @@ namespace BirdFont { public class FileChooser : GLib.Object { - public static const uint NONE = 0;- public static const uint SAVE = 1;- public static const uint LOAD = 1 << 1;- public static const uint DIRECTORY = 1 << 2;+ public const uint NONE = 0;+ public const uint SAVE = 1;+ public const uint LOAD = 1 << 1;+ public const uint DIRECTORY = 1 << 2; Gee.ArrayList<string> extensions = new Gee.ArrayList<string> (); @@ -39,9 +39,9 @@ public class FileDialogTab : Table { bool select_folder = false; #if LINUX- public static const string path_separator = "/";+ public const string path_separator = "/"; #else- public static const string path_separator = "\\";+ public const string path_separator = "\\"; #endif public FileDialogTab (string title, FileChooser action, bool folder) {@@ -73,11 +73,11 @@ bool is_modifier_key (uint i) { } /** Modifier flags */-public static const uint NONE = 0;-public static const uint CTRL = 1 << 0;-public static const uint ALT = 1 << 1;-public static const uint SHIFT = 1 << 2;-public static const uint LOGO = 1 << 3;+public const uint NONE = 0;+public const uint CTRL = 1 << 0;+public const uint ALT = 1 << 1;+public const uint SHIFT = 1 << 2;+public const uint LOGO = 1 << 3; public class KeyBindings { @@ -24,8 +24,8 @@ public class LicenseDialog : Dialog { double width = 0; double height; - static const double font_size = 20;- static const double margin = 20;+ const double font_size = 20;+ const double margin = 20; public LicenseDialog () { agreement = new TextArea (font_size);@@ -18,8 +18,8 @@ namespace BirdFont { /** Guide */ public class Line : GLib.Object {- public static const bool VERTICAL = true;- public static const bool HORIZONTAL = false;+ public const bool VERTICAL = true;+ public const bool HORIZONTAL = false; public bool dashed { get; set; } @@ -16,8 +16,8 @@ namespace BirdFont { public interface NativeWindow : GLib.Object { - public static const int HIDDEN = 0;- public static const int VISIBLE = 1;+ public const int HIDDEN = 0;+ public const int VISIBLE = 1; public abstract void file_chooser (string title, FileChooser file_chooser_callback, uint flags); @@ -17,19 +17,19 @@ namespace BirdFont { /** Type2, PostScript outlines */ public class CffTable : OtfTable { - static const uint8 HSTEM = 1;- static const uint8 VSTEM = 3;- static const uint8 VMOVETO = 4;- static const uint8 HLINETO = 6;- static const uint8 VLINETO = 7;- static const uint8 ENDCHAR = 14;- static const uint8 HMOVETO = 22;- static const uint8 RMOVETO = 21;+ const uint8 HSTEM = 1;+ const uint8 VSTEM = 3;+ const uint8 VMOVETO = 4;+ const uint8 HLINETO = 6;+ const uint8 VLINETO = 7;+ const uint8 ENDCHAR = 14;+ const uint8 HMOVETO = 22;+ const uint8 RMOVETO = 21; - static const uint8 CHARSET = 15;- static const uint8 ENCODING = 16;+ const uint8 CHARSET = 15;+ const uint8 ENCODING = 16; - static const uint8 VERSION = 0;+ const uint8 VERSION = 0; public int version; @@ -16,15 +16,15 @@ namespace BirdFont { public class GlyfTable : OtfTable { // Flags for composite glyph- static const uint16 BOTH_ARE_WORDS = 1 << 0;- static const uint16 BOTH_ARE_XY_VALUES = 1 << 1;- static const uint16 ROUND_TO_GRID = 1 << 2;- static const uint16 SCALE = 1 << 3;- static const uint16 RESERVED = 1 << 4;- static const uint16 MORE_COMPONENTS = 1 << 5;- static const uint16 SCALE_X_Y = 1 << 6;- static const uint16 SCALE_WITH_ROTATTION = 1 << 7;- static const uint16 INSTRUCTIONS = 1 << 8;+ const uint16 BOTH_ARE_WORDS = 1 << 0;+ const uint16 BOTH_ARE_XY_VALUES = 1 << 1;+ const uint16 ROUND_TO_GRID = 1 << 2;+ const uint16 SCALE = 1 << 3;+ const uint16 RESERVED = 1 << 4;+ const uint16 MORE_COMPONENTS = 1 << 5;+ const uint16 SCALE_X_Y = 1 << 6;+ const uint16 SCALE_WITH_ROTATTION = 1 << 7;+ const uint16 INSTRUCTIONS = 1 << 8; public int16 xmin = int16.MAX; public int16 ymin = int16.MAX;@@ -16,11 +16,11 @@ namespace BirdFont { public class KernTable : OtfTable { - public static const uint16 HORIZONTAL = 1;- public static const uint16 MINIMUM = 1 << 1;- public static const uint16 CROSS_STREAM = 1 << 2;- public static const uint16 OVERRIDE = 1 << 3;- public static const uint16 FORMAT = 1 << 8;+ public const uint16 HORIZONTAL = 1;+ public const uint16 MINIMUM = 1 << 1;+ public const uint16 CROSS_STREAM = 1 << 2;+ public const uint16 OVERRIDE = 1 << 3;+ public const uint16 FORMAT = 1 << 8; GlyfTable glyf_table; @@ -16,23 +16,23 @@ namespace BirdFont { public class NameTable : OtfTable { - public static const uint16 COPYRIGHT_NOTICE = 0;- public static const uint16 FONT_NAME = 1;- public static const uint16 SUBFAMILY_NAME = 2;- public static const uint16 UNIQUE_IDENTIFIER = 3;- public static const uint16 FULL_FONT_NAME = 4; // name + subfamily- public static const uint16 VERSION = 5;- public static const uint16 POSTSCRIPT_NAME = 6;- public static const uint16 TRADE_MARK = 7;- public static const uint16 MANUFACTURER = 8;- public static const uint16 DESIGNER = 9;- public static const uint16 DESCRIPTION = 10;- public static const uint16 VENDOR_URL = 11;- public static const uint16 DESIGNER_URL = 12;- public static const uint16 LICENSE = 13;- public static const uint16 LICENSE_URL = 14;- public static const uint16 PREFERED_FAMILY = 16;- public static const uint16 PREFERED_SUB_FAMILY = 17;+ public const uint16 COPYRIGHT_NOTICE = 0;+ public const uint16 FONT_NAME = 1;+ public const uint16 SUBFAMILY_NAME = 2;+ public const uint16 UNIQUE_IDENTIFIER = 3;+ public const uint16 FULL_FONT_NAME = 4; // name + subfamily+ public const uint16 VERSION = 5;+ public const uint16 POSTSCRIPT_NAME = 6;+ public const uint16 TRADE_MARK = 7;+ public const uint16 MANUFACTURER = 8;+ public const uint16 DESIGNER = 9;+ public const uint16 DESCRIPTION = 10;+ public const uint16 VENDOR_URL = 11;+ public const uint16 DESIGNER_URL = 12;+ public const uint16 LICENSE = 13;+ public const uint16 LICENSE_URL = 14;+ public const uint16 PREFERED_FAMILY = 16;+ public const uint16 PREFERED_SUB_FAMILY = 17; Gee.ArrayList<uint16> identifiers;@@ -18,16 +18,16 @@ namespace BirdFont { public class Os2Table : OtfTable { - public static const uint16 ITALIC = 1;- public static const uint16 UNDERSCORE = 1 << 1;- public static const uint16 NEGATIVE = 1 << 2;- public static const uint16 OUTLINED = 1 << 3;- public static const uint16 STRIKEOUT = 1 << 4;- public static const uint16 BOLD = 1 << 5;- public static const uint16 REGULAR = 1 << 6;- public static const uint16 TYPO_METRICS = 1 << 7;- public static const uint16 WWS = 1 << 8;- public static const uint16 OBLIQUE = 1 << 9;+ public const uint16 ITALIC = 1;+ public const uint16 UNDERSCORE = 1 << 1;+ public const uint16 NEGATIVE = 1 << 2;+ public const uint16 OUTLINED = 1 << 3;+ public const uint16 STRIKEOUT = 1 << 4;+ public const uint16 BOLD = 1 << 5;+ public const uint16 REGULAR = 1 << 6;+ public const uint16 TYPO_METRICS = 1 << 7;+ public const uint16 WWS = 1 << 8;+ public const uint16 OBLIQUE = 1 << 9; GlyfTable glyf_table; HmtxTable hmtx_table;@@ -20,11 +20,11 @@ namespace BirdFont { public class OtfFeatureTable : Table { Gee.ArrayList<Row> rows = new Gee.ArrayList<Row> (); - static const int NONE = 0;- static const int OTF_FEATURE = 1;- static const int SOURCE_GLYPH = 2; // the glyph to replace- static const int REPLACEMENT_GLYPH = 3;- static const int ALTERNATE_ENTRY = 4;+ const int NONE = 0;+ const int OTF_FEATURE = 1;+ const int SOURCE_GLYPH = 2; // the glyph to replace+ const int REPLACEMENT_GLYPH = 3;+ const int ALTERNATE_ENTRY = 4; GlyphCollection? glyph_collection = null; GlyphCollection? replacement_glyph = null;@@ -28,7 +28,7 @@ public class OverwriteDialog : Dialog { double width = 0; double height; - static const double question_font_size = 23;+ const double question_font_size = 23; public OverwriteDialog (OverWriteDialogListener callbacks) { double font_size = question_font_size * MainWindow.units;@@ -20,9 +20,9 @@ public class QuestionDialog : Dialog { TextArea question; public Gee.ArrayList<Button> buttons; - static const double font_size = 20;- static const double margin = 20;- static const double margin_small = 5;+ const double font_size = 20;+ const double margin = 20;+ const double margin_small = 5; double width = 300; double height = 0;@@ -52,7 +52,7 @@ public class TextArea : Widget { public signal void enter (string text); Gee.ArrayList<Paragraph> paragraphs = new Gee.ArrayList<Paragraph> ();- private static const int DONE = -2; + private const int DONE = -2; int last_paragraph = 0; string text;@@ -25,7 +25,7 @@ public class Row : GLib.Object { GLib.Object? row_data = null; - public static const int MAX_COLUMNS = 5;+ public const int MAX_COLUMNS = 5; public bool is_headline = false; @@ -28,7 +28,7 @@ public class SaveDialog : Dialog { double width = 0; double height; - static const double question_font_size = 23;+ const double question_font_size = 23; public SaveDialog (SaveDialogListener callbacks) { listener = callbacks;@@ -23,12 +23,12 @@ public class TabBar : GLib.Object { public Gee.ArrayList<Tab> tabs; - static const int NO_TAB = -1;- static const int NEXT_TAB = -2;- static const int PREVIOUS_TAB = -3;- static const int PROGRESS_WHEEL = -3;- static const int SHOW_MENU = -4;- static const int STOP_BUTTON = -5;+ const int NO_TAB = -1;+ const int NEXT_TAB = -2;+ const int PREVIOUS_TAB = -3;+ const int PROGRESS_WHEEL = -3;+ const int SHOW_MENU = -4;+ const int STOP_BUTTON = -5; int first_tab = 0; int selected = 0;@@ -26,7 +26,7 @@ public class TabContent : GLib.Object { static TextListener text_callback; static ImageSurface? pause_surface = null; - static const int TEXT_INPUT_HEIGHT = 51;+ const int TEXT_INPUT_HEIGHT = 51; static double last_press_time = 0;