[banshee/gio-hardware] [Widgets] Convert two static readonly fields to const



commit 62324c00fdfd63052a2d9d1990995c02a49b118e
Author: David Nielsen <gnomeuser gmail com>
Date:   Sat Jul 24 12:59:49 2010 +0200

    [Widgets] Convert two static readonly fields to const
    
    This is safe as the fields are not visible outside of the assembly.
    Reported by the PreferLiteralOverInitOnlyFieldsRule Gendarme rule.
    
    Signed-off-by: Bertrand Lorentz <bertrand lorentz gmail com>

 .../Banshee.Widgets/DiscUsageDisplay.cs            |    2 +-
 src/Core/Banshee.Widgets/Banshee.Widgets/Tile.cs   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Core/Banshee.Widgets/Banshee.Widgets/DiscUsageDisplay.cs b/src/Core/Banshee.Widgets/Banshee.Widgets/DiscUsageDisplay.cs
index fd4b8bb..3760b56 100644
--- a/src/Core/Banshee.Widgets/Banshee.Widgets/DiscUsageDisplay.cs
+++ b/src/Core/Banshee.Widgets/Banshee.Widgets/DiscUsageDisplay.cs
@@ -56,7 +56,7 @@ namespace Banshee.Widgets
         private Color text_color;
         private Color text_bg_color;
 
-        private static readonly double a1 = 3 * Math.PI / 2;
+        private const double a1 = 3 * Math.PI / 2;
         private double x, y, radius, a2, base_line_width;
 
         private long capacity;
diff --git a/src/Core/Banshee.Widgets/Banshee.Widgets/Tile.cs b/src/Core/Banshee.Widgets/Banshee.Widgets/Tile.cs
index 5a760be..ffa38bc 100644
--- a/src/Core/Banshee.Widgets/Banshee.Widgets/Tile.cs
+++ b/src/Core/Banshee.Widgets/Banshee.Widgets/Tile.cs
@@ -33,7 +33,7 @@ namespace Banshee.Widgets
 {
     public class Tile : Button
     {
-        private static readonly int pixbuf_size = 40;
+        private const int pixbuf_size = 40;
 
         private Image image = new Image ();
         public Label PrimaryLabel { get; private set; }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]