summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Helpers
diff options
context:
space:
mode:
authorsr55 <[email protected]>2013-08-17 20:38:18 +0000
committersr55 <[email protected]>2013-08-17 20:38:18 +0000
commitf319073778ba7f545a6c9d0a8dd07e3bf0e05aa8 (patch)
tree6fe7045222ed9a667e6c649b0808e49ae6d19ab0 /win/CS/HandBrakeWPF/Helpers
parentcc66e149da034cffaa48284532eec7e5b7ca72e8 (diff)
WinGui: General code tidyup
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5705 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrakeWPF/Helpers')
-rw-r--r--win/CS/HandBrakeWPF/Helpers/Macros.cs101
-rw-r--r--win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs4
2 files changed, 2 insertions, 103 deletions
diff --git a/win/CS/HandBrakeWPF/Helpers/Macros.cs b/win/CS/HandBrakeWPF/Helpers/Macros.cs
deleted file mode 100644
index 8ea8d11d5..000000000
--- a/win/CS/HandBrakeWPF/Helpers/Macros.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Macros.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// The macros.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrakeWPF.Helpers
-{
- /// <summary>
- /// The macros.
- /// </summary>
- public class Macros
- {
- /// <summary>
- /// The even.
- /// #define EVEN( a ) ( (a) + ( (a) & 1 ) )
- /// </summary>
- /// <param name="a">
- /// The a.
- /// </param>
- /// <returns>
- /// The <see cref="bool"/>.
- /// </returns>
- public static bool Even(int a)
- {
- return (a) + ((a) & 1) == 1;
- }
-
- /// <summary>
- /// The multipl e_ mo d_ down.
- /// #define MULTIPLE_MOD_DOWN( a, b ) ((b==1)?a:( b * ( (a) / b ) ))
- /// </summary>
- /// <param name="a">
- /// The a.
- /// </param>
- /// <param name="b">
- /// The b.
- /// </param>
- /// <returns>
- /// The <see cref="double"/>.
- /// </returns>
- public static int MultipleModDown(int a, int b)
- {
- return (b == 1) ? a : (b * ((a) / b));
- }
-
- /// <summary>
- /// The multiple mod up.
- /// #define MULTIPLE_MOD_UP( a, b ) ((b==1)?a:( b * ( ( (a) + (b) - 1) / b ) ))
- /// </summary>
- /// <param name="a">
- /// The a.
- /// </param>
- /// <param name="b">
- /// The b.
- /// </param>
- /// <returns>
- /// The <see cref="double"/>.
- /// </returns>
- public static int MultipleModUp(int a, int b)
- {
- return (b == 1) ? a : (b * (((a) + (b) - 1) / b));
- }
-
- /// <summary>
- /// The multiple of mod x
- /// #define MULTIPLE_MOD( a, b ) ((b==1)?a:( b * ( ( (a) + (b / 2) - 1) / b ) ))
- /// </summary>
- /// <param name="a">
- /// The a.
- /// </param>
- /// <param name="b">
- /// The b.
- /// </param>
- /// <returns>
- /// The <see cref="double"/>.
- /// </returns>
- public static int MultipleMod(int a, int b)
- {
- return (b == 1) ? a : (b * (((a) + (b / 2) - 1) / b));
- }
-
- /// <summary>
- /// The multiple of 16.
- /// #define MULTIPLE_16( a ) ( 16 * ( ( (a) + 8 ) / 16 ) )
- /// </summary>
- /// <param name="a">
- /// The a.
- /// </param>
- /// <returns>
- /// The <see cref="bool"/>.
- /// </returns>
- public static bool Multiple16(int a)
- {
- return 16 * (((a) + 8) / 16) == 1;
- }
- }
-}
diff --git a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
index 25e77bfa2..53ab407e2 100644
--- a/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
+++ b/win/CS/HandBrakeWPF/Helpers/QueueRecoveryHelper.cs
@@ -87,7 +87,7 @@ namespace HandBrakeWPF.Helpers
return queueFiles;
}
- catch (Exception exc)
+ catch (Exception)
{
return new List<string>(); // Keep quiet about the error.
}
@@ -132,7 +132,7 @@ namespace HandBrakeWPF.Helpers
// Once we load it in, remove it as we no longer need it.
File.Delete(Path.Combine(appDataPath, file));
}
- catch (Exception exc)
+ catch (Exception)
{
// Keep quite, nothing much we can do if there are problems.
// We will continue processing files.