mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Code quality fixes (NullReference checks, unused variables etc)
This commit is contained in:
parent
6ab6033f85
commit
ac08533727
99 changed files with 1252 additions and 1312 deletions
|
@ -28,8 +28,8 @@ using System.Windows.Forms;
|
|||
|
||||
using GreenshotPlugin.UnmanagedHelpers;
|
||||
using GreenshotPlugin.Core;
|
||||
using Greenshot.Plugin;
|
||||
using Greenshot.IniFile;
|
||||
using log4net;
|
||||
|
||||
namespace Greenshot.Configuration {
|
||||
public enum ScreenshotDestinations {Editor=1, FileDefault=2, FileWithDialog=4, Clipboard=8, Printer=16, EMail=32}
|
||||
|
@ -42,7 +42,7 @@ namespace Greenshot.Configuration {
|
|||
/// </summary>
|
||||
[Serializable]
|
||||
public class AppConfig {
|
||||
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(AppConfig));
|
||||
private static ILog LOG = LogManager.GetLogger(typeof(AppConfig));
|
||||
private static readonly Regex FIXOLD_REGEXP = new Regex(@"%(?<variable>[\w]+)%", RegexOptions.Compiled);
|
||||
private const string VAR_PREFIX = "${";
|
||||
private const string VAR_POSTFIX = "}";
|
||||
|
@ -112,7 +112,7 @@ namespace Greenshot.Configuration {
|
|||
/// <param name="oldPattern">String with old syntax %VAR%</param>
|
||||
/// <returns>The fixed pattern</returns>
|
||||
private static string FixFallback(string oldPattern) {
|
||||
return FIXOLD_REGEXP.Replace(oldPattern, new MatchEvaluator(delegate(Match m) { return VAR_PREFIX + m.Groups["variable"].Value + VAR_POSTFIX;}));
|
||||
return FIXOLD_REGEXP.Replace(oldPattern, delegate(Match m) { return VAR_PREFIX + m.Groups["variable"].Value + VAR_POSTFIX;});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue