lint: fix reserved identifier in function parameter names and comments

bugprone-reserved-identifier fixes:
- gen_utils.h: rename __size parameter to 'sz' in PtrArray and PtrSizeArray
  constructors (parameter names starting with __ are reserved)

- prometheus_helpers.h: update documentation comments to reference
  '::SIZE_' instead of '::__size' to match the actual enum values
v3.0-lint
Rene Cannao 1 month ago
parent 9bdfb8b1cd
commit f2bc1d4185

@ -153,14 +153,14 @@ class PtrArray {
unsigned int len;
unsigned int size;
void **pdata;
PtrArray(unsigned int __size=0) {
PtrArray(unsigned int sz=0) {
len=0;
pdata=NULL;
size=0;
if (__size) {
expand(__size);
if (sz) {
expand(sz);
}
size=__size;
size=sz;
}
~PtrArray() {
if (pdata) ( free(pdata) );
@ -240,7 +240,7 @@ class PtrSizeArray {
unsigned int len;
unsigned int size;
PtrSize_t *pdata;
PtrSizeArray(unsigned int __size=0);
PtrSizeArray(unsigned int sz=0);
~PtrSizeArray();
void add(void *p, unsigned int s) {

@ -19,7 +19,7 @@ using prometheus::Gauge;
* @tparam map_idx_enum The enum holding the types of elements contained in the 'metrics_map' argument.
* This enum must contain an element '::counters'.
* @tparam counters_enum The counters enum, holding all the identifiers of the metrics
* to be initialized in the 'counter_array' argument. It must contains a '::__size' element.
* to be initialized in the 'counter_array' argument. It must contains a '::SIZE_' element.
* @tparam metrics_map The type of the metrics map, it should be a 'tuple' holding the following elements:
* {
* int: metric_identifier,
@ -77,7 +77,7 @@ void init_prometheus_counter_array(
* @tparam map_idx_enum The enum holding the types of elements contained in the 'metrics_map' argument.
* This enum must contain an element '::gauges'.
* @tparam gauges_enum The counters enum, holding all the identifiers of the metrics
* to be initialized in the 'gauge_array' argument. It must contains a '::__size' element.
* to be initialized in the 'gauge_array' argument. It must contains a '::SIZE_' element.
* @tparam metrics_map The type of the metrics map, it should be a 'tuple' holding the following elements:
* {
* int: metric_identifier,
@ -135,7 +135,7 @@ void init_prometheus_gauge_array(
* @tparam map_idx_enum The enum holding the types of elements contained in the 'metrics_map' argument.
* This enum must contain an element '::dyn_counters'.
* @tparam dyn_counter_enum The counters enum, holding all the identifiers of the metrics
* to be initialized in the 'dyn_counter_array' argument. It must contains a '::__size' element.
* to be initialized in the 'dyn_counter_array' argument. It must contains a '::SIZE_' element.
* @tparam metrics_map The type of the metrics map, it should be a 'tuple' holding the following elements:
* {
* int: metric_identifier,
@ -191,7 +191,7 @@ void init_prometheus_dyn_counter_array(
* @tparam map_idx_enum The enum holding the types of elements contained in the 'metrics_map' argument.
* This enum must contain an element '::dyn_gauges'.
* @tparam dyn_gauge_enum The 'dyn_gauges' enum, holding all the identifiers of the metrics
* to be initialized in the 'dyn_gauge_array' argument. It must contains a '::__size' element.
* to be initialized in the 'dyn_gauge_array' argument. It must contains a '::SIZE_' element.
* @tparam metrics_map The type of the metrics map, it should be a 'tuple' holding the following elements:
* {
* int: metric_identifier,

Loading…
Cancel
Save