Clone in a terminal:
Commit 6e980f5
Johan Mattsson - 2017-08-25T19:07:14+00:00
6e980f5a1574258751e98bb68049e0548b838da9johan.mattsson.m@gmail.com

Fix warnings

Changed files (9)

Diff

diff --git a/libbirdfont/ExportTool.vala b/libbirdfont/ExportTool.valaindex 3de1fab..66c2061 100644--- a/libbirdfont/ExportTool.vala+++ b/libbirdfont/ExportTool.vala@@ -463,23 +463,6 @@ os.put_string ( 		return (!) d; 	} -	static bool can_write (File folder) {-		File test = get_child (folder, "text.tmp");-		bool writable = false;-		-		try {-			writable = FileUtils.set_contents ((!) test.get_path (), "test");-			-			if (writable) {-				FileUtils.remove ((!) test.get_path ());-			}-		} catch (GLib.Error e) {-			writable = false;-		}-		-		return writable;-	}- 	public static File get_export_dir () { 		return File.new_for_path (get_export_folder ()); 	}diff --git a/libbirdfont/GlyphRange.vala b/libbirdfont/GlyphRange.valaindex 0b26b5b..af8b0cb 100644--- a/libbirdfont/GlyphRange.vala+++ b/libbirdfont/GlyphRange.vala@@ -479,7 +479,6 @@ public class GlyphRange { 	} 	 	public unichar get_character (uint32 index) {-		int64 ti; 		string chr; 		UniRange r; 		unichar c;		diff --git a/libbirdfont/KerningTools.vala b/libbirdfont/KerningTools.valaindex 46b46fc..5847605 100644--- a/libbirdfont/KerningTools.vala+++ b/libbirdfont/KerningTools.vala@@ -129,9 +129,8 @@ public class KerningTools : ToolCollection  {  		Tool right_to_left = new Tool ("right_to_left", t_("Right to left")); 		right_to_left.select_action.connect ((self) => {-			KerningDisplay d = MainWindow.get_kerning_display ();-			d.right_to_left = !d.right_to_left;-			right_to_left.set_selected (d.right_to_left);+			KerningDisplay.right_to_left = !KerningDisplay.right_to_left;+			right_to_left.set_selected (KerningDisplay.right_to_left); 			GlyphCanvas.redraw (); 		}); 		kerning_tools.add_tool (right_to_left);diff --git a/libbirdfont/OpenFontFormat/GlyfData.vala b/libbirdfont/OpenFontFormat/GlyfData.valaindex 2fa75c6..667b5ff 100644--- a/libbirdfont/OpenFontFormat/GlyfData.vala+++ b/libbirdfont/OpenFontFormat/GlyfData.vala@@ -57,7 +57,6 @@ public class GlyfData : GLib.Object { 	} 		 	public GlyfData (Glyph g) {-		bool process; 		PathList all_quadratic = g.get_quadratic_paths ();  		PathList qp = new PathList (); 		@@ -149,7 +148,6 @@ public class GlyfData : GLib.Object { 		end_points.clear (); 		end_point = 0; 		-		int path_number = 0; 		foreach (Path quadratic in paths) { 			if (unlikely (quadratic.points.size == 0)) { 				warning (@"No points in path (before conversion $(quadratic.points.size))");diff --git a/libbirdfont/OpenFontFormat/HheaTable.vala b/libbirdfont/OpenFontFormat/HheaTable.valaindex c4e8410..11cc14c 100644--- a/libbirdfont/OpenFontFormat/HheaTable.vala+++ b/libbirdfont/OpenFontFormat/HheaTable.vala@@ -111,7 +111,6 @@ public class HheaTable : OtfTable { 		FontData fd = new FontData (); 		Fixed version = 1 << 16; 		Font font = OpenFontFormatWriter.get_current_font ();-		int upm, total_height; 		 		fd.add_fixed (version); // table version 		diff --git a/libbirdfont/OverView.vala b/libbirdfont/OverView.valaindex 189ecfe..55d0f53 100644--- a/libbirdfont/OverView.vala+++ b/libbirdfont/OverView.vala@@ -93,7 +93,6 @@ public class OverView : FontDisplay { 				TabBar tabs = MainWindow.get_tab_bar (); 				string n = glyph_collection.get_current ().name; 				bool selected = tabs.select_char (n);-				Glyph g = glyph_collection.get_current ();  				GlyphTab glyph_tab; 				 				if (!selected) {@@ -1439,7 +1438,6 @@ public class OverView : FontDisplay { 		selected_item = get_selected_item (); 		if (selected_item.glyphs != null) { 			open_glyph_signal ((!) selected_item.glyphs);-			GlyphCollection? gc2 = selected_item.glyphs; 			GlyphCollection gc = (!) selected_item.glyphs; 			gc.get_current ().close_path (); 		} else {diff --git a/libbirdfont/OverViewItem.vala b/libbirdfont/OverViewItem.valaindex 5e0f437..7b2d616 100644--- a/libbirdfont/OverViewItem.vala+++ b/libbirdfont/OverViewItem.vala@@ -99,7 +99,6 @@ public class OverViewItem : GLib.Object { 		} 		 		Glyph g;-		Font font; 		double gx, gy; 		double x1, x2, y1, y2; 		double scale_box;@@ -150,16 +149,10 @@ public class OverViewItem : GLib.Object { 	}  	public void draw_background () {-		Glyph g;-		Font font;-		double gx, gy;-		double x1, x2, y1, y2; 		double scale_box; 		double w, h;-		double glyph_width, glyph_height; 		Surface s; 		Context c;-		Color color = Color.black (); 		 		w = width; 		h = height;diff --git a/libbirdfont/Renderer/Text.vala b/libbirdfont/Renderer/Text.valaindex a5d368a..745ea24 100644--- a/libbirdfont/Renderer/Text.vala+++ b/libbirdfont/Renderer/Text.vala@@ -168,7 +168,6 @@ public class Text : Widget { 		}	  		if (word_with_ligatures.glyph.size > 0) {-			double none = 0; 			g = word_with_ligatures.glyph.get (0); 			if (g != null) { 				margin_left = ((!) g).get_left_side_bearing ();@@ -359,10 +358,6 @@ public class Text : Widget { 	} 	 	public void draw_at_baseline (Context cr, double px, double py, string cacheid = "") {-		double x, y;-		double ratio;-		double cc_y;- 		if (cache == null) { 			cache = draw_on_cache_surface (cacheid); 		}diff --git a/libbirdfont/TrackTool.vala b/libbirdfont/TrackTool.valaindex 4821339..3cf8c2c 100644--- a/libbirdfont/TrackTool.vala+++ b/libbirdfont/TrackTool.vala@@ -108,8 +108,7 @@ public class TrackTool : Tool { 					if (end_point.is_first ()) { 						end_point.path.reverse (); 					}-					-					Path path = end_point.path;					+								 					glyph.set_active_path (end_point.path); 				} else { 					p = new Path ();@@ -530,10 +529,7 @@ public class TrackTool : Tool { 	 * @return the last removed point. 	 */ 	public void convert_points_to_line () {-		EditPoint ep, last_point;-		double sum_x, sum_y, nx, ny;-		int px, py;-		EditPoint average, previous;+		double sum_x, sum_y; 		Path p; 		Glyph glyph; 		Gee.ArrayList<EditPoint> points;

Contact

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