From 1e39bfb03681302a97bbaf5e3f10034ddcb488e9 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Wed, 16 Jul 2008 09:42:14 +0000 Subject: squashing warnings critters --- .../ScriptEngine/Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs | 7 ++++++- OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs index 2bf9db7..7d41945 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs @@ -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 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 } /// diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs index 3d19d3e..17f2f1c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs @@ -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 } } } -- cgit v1.1