KiCad PCB EDA Suite
lib_tree_model.cpp File Reference
#include <lib_tree_model.h>
#include <eda_pattern_match.h>
#include <lib_tree_item.h>
#include <make_unique.h>
#include <utility>
#include <pgm_base.h>
#include <kicad_string.h>

Go to the source code of this file.

Functions

static int matchPosScore (int aPosition, int aMaximum)
 

Variables

static const unsigned kLowestDefaultScore = 1
 

Function Documentation

static int matchPosScore ( int  aPosition,
int  aMaximum 
)
static

Definition at line 47 of file lib_tree_model.cpp.

Referenced by LIB_TREE_NODE_LIB_ID::UpdateScore(), and LIB_TREE_NODE_LIB::UpdateScore().

48 {
49  return ( aPosition < aMaximum ) ? aMaximum - aPosition : 0;
50 }

Variable Documentation

const unsigned kLowestDefaultScore = 1
static

Definition at line 36 of file lib_tree_model.cpp.

Referenced by LIB_TREE_NODE::ResetScore().