squashing warnings critters

0.6.0-stable
Dr Scofield 2008-07-16 09:42:14 +00:00
parent 4350613f1d
commit 1e39bfb036
4 changed files with 20 additions and 2 deletions

View File

@ -249,6 +249,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
object[] arguments = YP.getFunctorArgs(Head);
// We always match Head from _allAnswers, and the Body is Atom.a("true").
#pragma warning disable 0168
foreach (bool l1 in YP.unify(Body, Atom.a("true")))
{
// The caller can assert another answer into this same predicate during yield, so we have to
@ -259,6 +260,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
yield return false;
}
}
#pragma warning restore 0168
}
public IEnumerable<bool> retract(object Head, object Body)
@ -268,7 +270,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
throw new PrologException("instantiation_error", "Head is an unbound variable");
object[] arguments = YP.getFunctorArgs(Head);
// We always match Head from _allAnswers, and the Body is Atom.a("true").
// We always match Head from _allAnswers, and the Body is
// Atom.a("true").
#pragma warning disable 0168
foreach (bool l1 in YP.unify(Body, Atom.a("true")))
{
// The caller can assert another answer into this same predicate during yield, so we have to
@ -283,6 +287,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
}
}
}
#pragma warning restore 0168
}
/// <summary>

View File

@ -673,8 +673,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
object[] args = new object[(int)Arity];
for (int i = 0; i < args.Length; ++i)
args[i] = new Variable();
#pragma warning disable 0219
foreach (bool l1 in YP.unify(Term, Functor.make((Atom)FunctorName, args)))
yield return false;
#pragma warning restore 0219
}
}
else
@ -2399,11 +2401,13 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.YieldProlog
if (_Head == null || _Body == null)
yield break;
#pragma warning disable 0168
foreach (bool l1 in YP.unify(Head, _Head))
{
foreach (bool l2 in YP.unify(Body, _Body))
yield return false;
}
#pragma warning restore 0168
}
}
}

View File

@ -249,6 +249,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
object[] arguments = YP.getFunctorArgs(Head);
// We always match Head from _allAnswers, and the Body is Atom.a("true").
#pragma warning disable 0168
foreach (bool l1 in YP.unify(Body, Atom.a("true")))
{
// The caller can assert another answer into this same predicate during yield, so we have to
@ -259,6 +260,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
yield return false;
}
}
#pragma warning restore 0168
}
public IEnumerable<bool> retract(object Head, object Body)
@ -268,7 +270,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
throw new PrologException("instantiation_error", "Head is an unbound variable");
object[] arguments = YP.getFunctorArgs(Head);
// We always match Head from _allAnswers, and the Body is Atom.a("true").
// We always match Head from _allAnswers, and the Body is
// Atom.a("true").
#pragma warning disable 0168
foreach (bool l1 in YP.unify(Body, Atom.a("true")))
{
// The caller can assert another answer into this same predicate during yield, so we have to
@ -283,6 +287,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
}
}
}
#pragma warning restore 0168
}
/// <summary>

View File

@ -673,8 +673,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
object[] args = new object[(int)Arity];
for (int i = 0; i < args.Length; ++i)
args[i] = new Variable();
#pragma warning disable 0219
foreach (bool l1 in YP.unify(Term, Functor.make((Atom)FunctorName, args)))
yield return false;
#pragma warning restore 0219
}
}
else
@ -2399,11 +2401,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog
if (_Head == null || _Body == null)
yield break;
#pragma warning disable 0168
foreach (bool l1 in YP.unify(Head, _Head))
{
foreach (bool l2 in YP.unify(Body, _Body))
yield return false;
}
#pragma warning disable 0168
}
}
}