// addPointer to the pointerMap, update reusedPointers. Returns true if pointer was reused
968549
func (pm *pointerMap) addPointerReturnTrueIfWasReused(ptr uintptr) bool {
	// Is this allready known to be reused?
	for _, have := range pm.reusedPointers {
		if ptr == have {
			return true
		}
	}
	// Have we seen it once before?
	for _, seen := range pm.pointers {
		if ptr == seen {
			// Add it to the register of pointers we have seen more than once
			pm.reusedPointers = append(pm.reusedPointers, ptr)
			return true
		}
	}
	// This pointer was new to us
	pm.pointers = append(pm.pointers, ptr)
	return false
}
681974
func (p *Point) AddScalar(s float32) *Point {
	p.X += s
	p.Y += s
	return p
}
374010
func (e *G2) Add(a, b *G2) *G2 {
	if e.p == nil {
		e.p = &twistPoint{}
	}
	e.p.Add(a.p, b.p)
	return e
}
503855
func (m *Meta) Pointers(i interface{}, cols ...string) []interface{} {
	ptr := reflects.Ptr(i)
	values := make([]interface{}, len(cols))
	for i, f := range cols {
		if fi := m.fieldMap[f]; fi != nil {
			values[i] = fi.GetPointer(ptr)
		} else {
			var val interface{}
			values[i] = &val
		}
	}
	return values
}
1009917
func PointerUp(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "pointerup", Listener: listener}
}
298399
func (s *IndicesRolloverService) AddMapping(typ string, mapping interface{}) *IndicesRolloverService {
	s.mappings[typ] = mapping
	return s
}
31730
func (e *ErrorsTotalMap) retrievePointerFor(err HTTPError) *uint64 {
	serr := simplifyHTTPError(err)
	e.lock.RLock()
	ptr, ok := e.counter[serr]
	e.lock.RUnlock()
	if ok {
		return ptr
	}

	// For pointer creation, a write-lock is required
	e.lock.Lock()
	// We ensure that the pointer wasn't created in the meantime
	if ptr, ok = e.counter[serr]; !ok {
		ptr = new(uint64)
		e.counter[serr] = ptr
	}
	e.lock.Unlock()

	return ptr
}
1091039
func AddrReplace(link Link, addr *Addr) error {
	return pkgHandle.AddrReplace(link, addr)
}
366970
func PointerLeave(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "pointerleave", Listener: listener}
}
770312
func (c *EndpointCache) Add(endpoint Endpoint) {
	// de-dups multiple adds of an endpoint with a pre-existing key
	if iface, ok := c.endpoints.Load(endpoint.Key); ok {
		e := iface.(Endpoint)
		if e.Len() > 0 {
			return
		}
	}
	c.endpoints.Store(endpoint.Key, endpoint)

	size := atomic.AddInt64(&c.size, 1)
	if size > 0 && size > c.endpointLimit {
		c.deleteRandomKey()
	}
}
437455
func (q *Quadtree) Add(p orb.Pointer) error {
	if p == nil {
		return nil
	}

	point := p.Point()
	if !q.bound.Contains(point) {
		return ErrPointOutsideOfBounds
	}

	if q.root == nil {
		q.root = &node{
			Value: p,
		}
		return nil
	}

	q.add(q.root, p, p.Point(),
		// q.bound.Left(), q.bound.Right(),
		// q.bound.Bottom(), q.bound.Top(),
		q.bound.Min[0], q.bound.Max[0],
		q.bound.Min[1], q.bound.Max[1],
	)

	return nil
}
388287
func (ncs *nodeCacheStandard) UpdatePointer(
	oldRef data.BlockRef, newPtr data.BlockPointer) (updatedNode NodeID) {
	if oldRef == (data.BlockRef{}) && newPtr == (data.BlockPointer{}) {
		return nil
	}

	if !oldRef.IsValid() {
		panic(fmt.Sprintf("invalid oldRef %s with newPtr %s", oldRef, newPtr))
	}

	if !newPtr.IsValid() {
		panic(fmt.Sprintf("invalid newPtr %s with oldRef %s", newPtr, oldRef))
	}

	ncs.lock.Lock()
	defer ncs.lock.Unlock()
	entry, ok := ncs.nodes[oldRef]
	if !ok {
		return nil
	}

	// Cannot update the pointer for an unlinked node.
	if entry.core.cachedPath.IsValid() {
		return nil
	}

	entry.core.pathNode.BlockPointer = newPtr
	delete(ncs.nodes, oldRef)
	ncs.nodes[newPtr.Ref()] = entry
	return entry.core
}
1127639
func (s *dumpState) visitPointerAndCheckIfItIsTheFirstTime(ptr uintptr) bool {
	for _, addr := range s.visitedPointers {
		if addr == ptr {
			return false
		}
	}
	s.visitedPointers = append(s.visitedPointers, ptr)
	return true
}
708143
func (ro *renameOp) AddSelfUpdate(ptr data.BlockPointer) {
	ro.AddUpdate(ptr, ptr)
}
812416
func (tc *typCache) isPointer(typ reflect.Type) bool {
	return tc.info(typ).isPointer
}
1338489
func (calc *PointCentroidCalculator) AddPoint(point *geom.Point) {
	calc.AddCoord(geom.Coord(point.FlatCoords()))
}
1203084
func (ro *rmOp) AddSelfUpdate(ptr data.BlockPointer) {
	ro.AddUpdate(ptr, ptr)
}