fix some simple problems (but doesn't pass tests yet)
looks like a logic error: new advice::Request got solution
This commit is contained in:
parent
203b955a33
commit
7d93dae8ea
3 changed files with 9 additions and 8 deletions
|
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include "lib/advice/binding.hpp"
|
||||
#include "lib/symbol.hpp"
|
||||
#include "lib/util.hpp"
|
||||
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
|
@ -30,6 +31,7 @@
|
|||
|
||||
|
||||
using lib::Literal;
|
||||
using util::isnil;
|
||||
|
||||
using boost::regex;
|
||||
using boost::smatch;
|
||||
|
|
@ -102,8 +104,8 @@ namespace advice {
|
|||
|
||||
Binding::Binding (Literal spec)
|
||||
{
|
||||
REQUIRE (spec);
|
||||
parse_and_append (spec);
|
||||
if (!isnil(spec))
|
||||
parse_and_append (spec);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -63,9 +63,8 @@
|
|||
** could be fed as parameters to the bound advice. But this extension requires to extend
|
||||
** the simple hash-based match check to an actual unification of the patterns. ///TICKET #615
|
||||
**
|
||||
** @see configrules.hpp
|
||||
** @see typed-lookup.cpp corresponding implementation
|
||||
** @see typed-id-test.cpp
|
||||
** @see advice.hpp
|
||||
** @see advice-binding-pattern-test.cpp
|
||||
**
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -214,12 +214,12 @@ namespace advice {
|
|||
overwrite (POA const& oldRef, POA& newElm)
|
||||
{
|
||||
EIter pos = std::find (elms_.begin(),elms_.end(), oldRef);
|
||||
REQUIRE (pos!=elms_.end(), "Attempt to overwrite an entry which isn't there.");
|
||||
REQUIRE (!contains (newElm), "Duplicate entry");
|
||||
REQUIRE (pos!=elms_.end(), "Attempt to overwrite an entry which isn't there.");
|
||||
REQUIRE_IF (&oldRef != &newElm, !contains (newElm), "Duplicate entry");
|
||||
|
||||
*pos = Entry(newElm);
|
||||
|
||||
ENSURE (!contains (oldRef), "Duplicate entry");
|
||||
REQUIRE_IF (&oldRef != &newElm, !contains (oldRef), "Duplicate entry");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Reference in a new issue