Code quality fixes (NullReference checks, unused variables etc)

This commit is contained in:
RKrom 2014-04-26 00:34:06 +02:00
commit ac08533727
99 changed files with 1252 additions and 1312 deletions

View file

@ -24,7 +24,6 @@ using System.Drawing;
using Greenshot.Drawing.Fields;
using Greenshot.Plugin.Drawing;
using GreenshotPlugin.Core;
/// <summary>
/// Graphical filter which can be added to DrawableContainer.

View file

@ -23,14 +23,14 @@ using System.Drawing;
using Greenshot.Drawing.Fields;
using Greenshot.Plugin.Drawing;
using GreenshotPlugin.Core;
using System.Drawing.Imaging;
using GreenshotPlugin.UnmanagedHelpers;
using System.Drawing.Drawing2D;
using log4net;
namespace Greenshot.Drawing.Filters {
[Serializable()]
public class BlurFilter : AbstractFilter {
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(BlurFilter));
private static ILog LOG = LogManager.GetLogger(typeof(BlurFilter));
public double previewQuality;
public double PreviewQuality {

View file

@ -46,10 +46,10 @@ namespace Greenshot.Drawing.Filters {
graphics.SetClip(applyRect);
graphics.ExcludeClip(rect);
}
ColorMatrix grayscaleMatrix = new ColorMatrix(new float[][] {
new float[] {.3f, .3f, .3f, 0, 0},
new float[] {.59f, .59f, .59f, 0, 0},
new float[] {.11f, .11f, .11f, 0, 0},
ColorMatrix grayscaleMatrix = new ColorMatrix(new[] {
new[] {.3f, .3f, .3f, 0, 0},
new[] {.59f, .59f, .59f, 0, 0},
new[] {.11f, .11f, .11f, 0, 0},
new float[] {0, 0, 0, 1, 0},
new float[] {0, 0, 0, 0, 1}
});

View file

@ -23,7 +23,6 @@ using System.Drawing;
using Greenshot.Drawing.Fields;
using Greenshot.Plugin.Drawing;
using GreenshotPlugin.Core;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
namespace Greenshot.Drawing.Filters {

View file

@ -18,7 +18,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.ComponentModel;
using System.Drawing;

View file

@ -23,7 +23,6 @@ using System.Drawing;
using Greenshot.Drawing.Fields;
using Greenshot.Plugin.Drawing;
using GreenshotPlugin.Core;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
namespace Greenshot.Drawing.Filters {