Clone in a terminal:
Commit c5ececa
Johan Mattsson - 2013-09-02T18:15:29+00:00
c5ececa315fa0f4509c27139eada474ee8c5705ejohan.mattsson.m@gmail.com

fix compiler warnings

Changed files (8)

Diff

diff --git a/libbirdfont/BirdFontFile.vala b/libbirdfont/BirdFontFile.valaindex e2c5603..b49b94b 100644--- a/libbirdfont/BirdFontFile.vala+++ b/libbirdfont/BirdFontFile.vala@@ -91,7 +91,6 @@ class BirdFontFile { 			File file = File.new_for_path (path); 			uint num_kerning_pairs; 			uint progress;-			uint num_glyphs; 			 			if (file.query_file_type (0) == FileType.DIRECTORY) { 				warning (@"Can not save font. $path is a directory.");diff --git a/libbirdfont/ExportTool.vala b/libbirdfont/ExportTool.valaindex e96cc22..060818c 100644--- a/libbirdfont/ExportTool.vala+++ b/libbirdfont/ExportTool.vala@@ -168,7 +168,6 @@ public class ExportTool : GLib.Object { 		 	static void do_export () { 		bool f;-		Preview preview; 				 		f = export_ttf_font (); 		if (!f) {diff --git a/libbirdfont/Glyph.vala b/libbirdfont/Glyph.valaindex 32b3800..27cc4a8 100644--- a/libbirdfont/Glyph.vala+++ b/libbirdfont/Glyph.vala@@ -975,7 +975,6 @@ public class Glyph : FontDisplay { 	 	public void move_selected_edit_point_coordinates (EditPoint selected_point, double xt, double yt) {	 		double x, y;-		EditPoint p; 				 		BirdFont.get_current_font ().touch (); diff --git a/libbirdfont/GridTool.vala b/libbirdfont/GridTool.valaindex bd229e2..c6ceb10 100644--- a/libbirdfont/GridTool.vala+++ b/libbirdfont/GridTool.vala@@ -139,11 +139,6 @@ class GridTool : Tool {  		}	 	}-		-	/** Sets x and y the point closest on grid. */-	public static void tie (ref double x, ref double y) {-		tie_point (ref x, ref y, false);-	}  	public static void tie_coordinate (ref double x, ref double y) { 		tie_point (ref x, ref y, true);diff --git a/libbirdfont/KerningDisplay.vala b/libbirdfont/KerningDisplay.valaindex bed913a..822f670 100644--- a/libbirdfont/KerningDisplay.vala+++ b/libbirdfont/KerningDisplay.vala@@ -61,10 +61,6 @@ public class KerningDisplay : FontDisplay { 		} 	} 	-	private void draw_list (WidgetAllocation allocation, Context cr) {-		kerning_list.draw (allocation, cr);-	}-	 	public void draw_error_message (WidgetAllocation allocation, Context cr) { 		string line1 = _("The current kerning class is malformed."); 		string line2 = _("Add single characters separated by space and ranges on the form A-Z.");diff --git a/libbirdfont/OpenFontFormat/GlyfTable.vala b/libbirdfont/OpenFontFormat/GlyfTable.valaindex e874041..a7e72c9 100644--- a/libbirdfont/OpenFontFormat/GlyfTable.vala+++ b/libbirdfont/OpenFontFormat/GlyfTable.vala@@ -60,19 +60,6 @@ class GlyfTable : Table { 		glyphs = new List<Glyph> (); 	}	 -	public int get_gid_from_unicode (unichar c) {-		int i = 0;-		foreach (Glyph g in glyphs) {-			if (g.unichar_code == c) {-				return i;-			}-		-			i++;-		}-		-		return -1;-	}- 	public int get_gid (string name) { 		int i = 0; 		@@ -260,7 +247,9 @@ class GlyfTable : Table { 		 		// flags		 		nflags = glyf_data.get_nflags ();-		if (nflags != npoints) {+		if (unlikely (nflags != npoints)) {+			print ("glyf table data:\n");+			fd.dump (); 			warning (@"(nflags != npoints)  ($nflags != $npoints) in glyph $(g.name). ncontours: $ncontours"); 		} 		assert (nflags == npoints);diff --git a/libbirdfont/OverView.vala b/libbirdfont/OverView.valaindex 689fae1..c2cb898 100644--- a/libbirdfont/OverView.vala+++ b/libbirdfont/OverView.vala@@ -852,6 +852,10 @@ public class OverView : FontDisplay { 			x = (allocation.width - w) / 2.0; 		} 		+		if (x < 0) {+			x = 0;+		}+		 		// background	 		cr.save (); 		cr.set_source_rgba (1, 1, 1, 0.98);diff --git a/libbirdfont/ResizeTool.vala b/libbirdfont/ResizeTool.valaindex 4ccb6fb..f490f42 100644--- a/libbirdfont/ResizeTool.vala+++ b/libbirdfont/ResizeTool.vala@@ -79,8 +79,6 @@ class ResizeTool : Tool { 		}); 		 		move_action.connect ((self, x, y)	 => {-			Glyph glyph = MainWindow.get_current_glyph ();-			 			if (resize_path && can_resize (x, y)) { 				resize (x, y); 			}@@ -107,37 +105,6 @@ class ResizeTool : Tool { 			out selection_box_center_y, out selection_box_width, 			out selection_box_height);	 	}-	-	void move_selected_paths (uint key) {-		Glyph glyph = MainWindow.get_current_glyph ();-		double x, y;-		-		x = 0;-		y = 0;-		-		switch (key) {-			case Key.UP:-				y = 1;-				break;-			case Key.DOWN:-				y = -1;-				break;-			case Key.LEFT:-				x = -1;-				break;-			case Key.RIGHT:-				x = 1;-				break;-			default:-				break;-		}-		-		foreach (Path path in glyph.active_paths) {-			path.move (x * Glyph.ivz (), y * Glyph.ivz ());-		}-		-		glyph.redraw_area (0, 0, glyph.allocation.width, glyph.allocation.height);-	}  	double get_resize_ratio (double x, double y) { 		double ratio;

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112