Shortended function signature and changed flag priority

This commit is contained in:
l.albertalli 2015-02-10 10:48:02 -08:00
parent cca6d53623
commit 50c3e5f93c
5 changed files with 23 additions and 18 deletions

View file

@ -100,18 +100,18 @@ func newQuadStore() *QuadStore {
}
}
func (qs *QuadStore) ApplyDeltas(deltas []graph.Delta, ignoreDuplicate bool, ignoreMissing bool) error {
func (qs *QuadStore) ApplyDeltas(deltas []graph.Delta, ignoreDupl, ignoreMiss bool) error {
for _, d := range deltas {
var err error
switch d.Action {
case graph.Add:
err = qs.AddDelta(d)
if err != nil && ignoreDuplicate{
if err != nil && ignoreDupl{
err = nil
}
case graph.Delete:
err = qs.RemoveDelta(d)
if err != nil && ignoreMissing{
if err != nil && ignoreMiss{
err = nil
}
default: