From ae0bcab35e58796da3d214edbfade6ac302cb82c Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Mon, 17 Nov 2008 11:06:24 +0000 Subject: adding #pragma warnings to yprolog language support --- .../Shared/Api/Runtime/YieldProlog/BagofAnswers.cs | 4 ++-- .../Shared/Api/Runtime/YieldProlog/FindallAnswers.cs | 4 ++-- .../ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor1.cs | 4 ++-- .../ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs | 4 ++-- .../ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs | 4 ++-- .../Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs | 8 ++++---- .../ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs | 4 ++-- .../Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs | 10 ++++------ .../ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs | 4 ++-- 9 files changed, 22 insertions(+), 24 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs index 4a4e052..bbf1a5b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs @@ -115,7 +115,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog // disable warning on l1, don't see how we can // code this differently - #pragma warning disable 0168 + #pragma warning disable 0168, 0219 /// /// For each result, unify the _freeVariables and unify bagArrayVariable with the associated bag. @@ -208,7 +208,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog bagOfAnswers.add(); return bagOfAnswers.resultSet(Bag); } - #pragma warning restore 0168 + #pragma warning restore 0168, 0219 /// /// A TermArrayEqualityComparer implements IEqualityComparer to compare two object arrays using YP.termEqual. diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/FindallAnswers.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/FindallAnswers.cs index f175494..fb9569e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/FindallAnswers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/FindallAnswers.cs @@ -73,7 +73,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog // disable warning on l1, don't see how we can // code this differently - #pragma warning disable 0168 + #pragma warning disable 0168, 0219 /// /// This is a simplified findall when the goal is a single call. @@ -103,6 +103,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog findallAnswers.add(); return findallAnswers.resultArray(); } - #pragma warning restore 0168 + #pragma warning restore 0168, 0219 } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor1.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor1.cs index 351114d..80d98b1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor1.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor1.cs @@ -51,7 +51,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog // disable warning on l1, don't see how we can // code this differently - #pragma warning disable 0168 + #pragma warning disable 0168, 0219 /// /// If arg is another Functor1, then succeed (yield once) if this and arg have the /// same name and the functor args unify, otherwise fail (don't yield). @@ -78,7 +78,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog yield return false; } } - #pragma warning restore 0168 + #pragma warning restore 0168, 0219 public override string ToString() diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs index 6817d11..4c501d6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs @@ -53,7 +53,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog // disable warning on l1, don't see how we can // code this differently - #pragma warning disable 0168 + #pragma warning disable 0168, 0219 /// If arg is another Functor2, then succeed (yield once) if this and arg have the /// same name and all functor args unify, otherwise fail (don't yield). /// If arg is a Variable, then call its unify to unify with this. @@ -79,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog yield return false; } } - #pragma warning restore 0168 + #pragma warning restore 0168, 0219 public override string ToString() diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs index b237a82..94e39c4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs @@ -55,7 +55,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog // disable warning on l1, don't see how we can // code this differently - #pragma warning disable 0168 + #pragma warning disable 0168, 0219 /// If arg is another Functor3, then succeed (yield once) if this and arg have the /// same name and all functor args unify, otherwise fail (don't yield). /// If arg is a Variable, then call its unify to unify with this. @@ -84,7 +84,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog yield return false; } } - #pragma warning restore 0168 + #pragma warning restore 0168, 0219 public override string ToString() { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs index d6a339b..04357a9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/IndexedAnswers.cs @@ -249,7 +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 + #pragma warning disable 0168, 0219 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 @@ -260,7 +260,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog yield return false; } } - #pragma warning restore 0168 + #pragma warning restore 0168, 0219 } public IEnumerable retract(object Head, object Body) @@ -271,7 +271,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 + #pragma warning disable 0168, 0219 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 @@ -286,7 +286,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog } } } - #pragma warning restore 0168 + #pragma warning restore 0168, 0219 } /// diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs index a606465..ea5b7a6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs @@ -116,10 +116,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog { // disable warning on l1, don't see how we can // code this differently - #pragma warning disable 0168 + #pragma warning disable 0168, 0219 foreach (bool l1 in YP.unify(this, arg)) yield return false; - #pragma warning restore 0168 + #pragma warning restore 0168, 0219 } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs index 2e90d74..5a9b0aa 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs @@ -623,7 +623,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog // disable warning on l1, don't see how we can // code this differently - #pragma warning disable 0168 + #pragma warning disable 0168, 0219 public static IEnumerable univ(object Term, object List) { Term = YP.getValue(Term); @@ -704,10 +704,8 @@ 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 @@ -2632,7 +2630,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog throw new NotImplementedException(); } } - #pragma warning restore 0168 + #pragma warning restore 0168, 0219 /// /// A ClauseHeadAndBody is used in Compiler.compileAnonymousFunction as a base class /// in order to implement YP.IClause. After creating the object, you must call setHeadAndBody. @@ -2653,13 +2651,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog if (_Head == null || _Body == null) yield break; - #pragma warning disable 0168 + #pragma warning disable 0168, 0219 foreach (bool l1 in YP.unify(Head, _Head)) { foreach (bool l2 in YP.unify(Body, _Body)) yield return false; } - #pragma warning restore 0168 + #pragma warning restore 0168, 0219 } } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs index de7f168..c6a6748 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs @@ -203,7 +203,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog // disable warning on l1, don't see how we can // code this differently - #pragma warning disable 0168,0164,0162 + #pragma warning disable 0168, 0164, 0162, 0219 public static bool isDetNoneOut(object State, object Term) { State = YP.getValue(State); @@ -241,7 +241,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog return false; } - #pragma warning restore 0168,0164,0162 + #pragma warning restore 0168, 0164, 0162, 0219 /// /// Return false if any of args is out, otherwise true. -- cgit v1.1