Audacity 3.2.0
Functions
anonymous_namespace{ExportMP3.cpp} Namespace Reference

Functions

int ValidateValue (int nValues, int value, int defaultValue)
 
int ValidateValue (const std::vector< int > &values, int value, int defaultValue)
 
int ValidateIndex (const std::vector< int > &values, int value, int defaultIndex)
 

Function Documentation

◆ ValidateIndex()

int anonymous_namespace{ExportMP3.cpp}::ValidateIndex ( const std::vector< int > &  values,
int  value,
int  defaultIndex 
)

Definition at line 462 of file ExportMP3.cpp.

463{
464 auto start = values.begin(), finish = values.end(),
465 iter = std::find( start, finish, value );
466 return ( iter != finish ) ? static_cast<int>( iter - start ) : defaultIndex;
467}
const wxChar * values

References values.

◆ ValidateValue() [1/2]

int anonymous_namespace{ExportMP3.cpp}::ValidateValue ( const std::vector< int > &  values,
int  value,
int  defaultValue 
)

Definition at line 455 of file ExportMP3.cpp.

456{
457 auto start = values.begin(), finish = values.end(),
458 iter = std::find( start, finish, value );
459 return ( iter != finish ) ? value : defaultValue;
460}

References values.

◆ ValidateValue() [2/2]

int anonymous_namespace{ExportMP3.cpp}::ValidateValue ( int  nValues,
int  value,
int  defaultValue 
)

Definition at line 450 of file ExportMP3.cpp.

451{
452 return (value >= 0 && value < nValues) ? value : defaultValue;
453}