diff options
author | sr55 <[email protected]> | 2009-01-29 21:49:05 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-01-29 21:49:05 +0000 |
commit | 0333e36d98952fc75b07a35bb2dd5affe526b25a (patch) | |
tree | 98bfbe7260eae1cffba33107bd19379cadad2b11 /win/C#/Functions/QueryParser.cs | |
parent | 9cfe126a970a4a7c544b8142224675a93637d31e (diff) |
WinGui:
- Code cleanup
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2106 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/QueryParser.cs')
-rw-r--r-- | win/C#/Functions/QueryParser.cs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs index df048c5d1..f189e1bbc 100644 --- a/win/C#/Functions/QueryParser.cs +++ b/win/C#/Functions/QueryParser.cs @@ -718,8 +718,7 @@ namespace Handbrake.Functions if (chapters.Success)
{
- var actTitles = new string[2];
- actTitles = chapters.ToString().Replace("-c ", "").Split('-');
+ string[] actTitles = chapters.ToString().Replace("-c ", "").Split('-');
thisQuery.q_chaptersStart = int.Parse(actTitles[0]);
if (actTitles.Length > 1)
{
@@ -777,8 +776,7 @@ namespace Handbrake.Functions if (crop.Success)
{
thisQuery.q_cropValues = crop.ToString().Replace("--crop ", "");
- var actCropValues = new string[3];
- actCropValues = thisQuery.q_cropValues.Split(':');
+ string[] actCropValues = thisQuery.q_cropValues.Split(':');
thisQuery.q_croptop = actCropValues[0];
thisQuery.q_cropbottom = actCropValues[1];
thisQuery.q_cropLeft = actCropValues[2];
@@ -853,17 +851,14 @@ namespace Handbrake.Functions thisQuery.q_twoPass = twoPass.Success;
thisQuery.q_turboFirst = turboFirstPass.Success;
thisQuery.q_largeMp4 = largerMp4.Success;
- if (videoFramerate.Success)
- thisQuery.q_videoFramerate = videoFramerate.ToString().Replace("-r ", "");
- else
- thisQuery.q_videoFramerate = "Same as source";
+ thisQuery.q_videoFramerate = videoFramerate.Success ? videoFramerate.ToString().Replace("-r ", "") : "Same as source";
if (videoBitrate.Success)
thisQuery.q_avgBitrate = videoBitrate.ToString().Replace("-b ", "");
if (videoFilesize.Success)
thisQuery.q_videoTargetSize = videoFilesize.ToString().Replace("-S ", "");
- double qConvert = 0;
+ double qConvert;
if (videoQuality.Success)
{
qConvert = double.Parse(videoQuality.ToString().Replace("-q ", ""), Culture)*100;
|