From 8722f71cb622b728ccfaf6769ac57a6a1263cd06 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 6 Apr 2008 14:29:16 +0000 Subject: [PATCH] Removed ifs in AL.GetSource (boolean) in favour of simple comparisons. --- Source/OpenTK/Audio/OpenAL/AL/AL.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Source/OpenTK/Audio/OpenAL/AL/AL.cs b/Source/OpenTK/Audio/OpenAL/AL/AL.cs index a8901466..6633bc7d 100644 --- a/Source/OpenTK/Audio/OpenAL/AL/AL.cs +++ b/Source/OpenTK/Audio/OpenAL/AL/AL.cs @@ -791,10 +791,7 @@ namespace OpenTK.Audio { int result; GetSource(sid, (ALGetSourcei)param, out result); - if (result == 1) - value = true; - else - value = false; + value = result != 0; } /// This function retrieves a bool property of a source. @@ -806,10 +803,7 @@ namespace OpenTK.Audio { int result; GetSource((uint)sid, (ALGetSourcei)param, out result); - if (result == 1) - value = true; - else - value = false; + value = result != 0; } #endregion GetSourcei