Skip to content

Commit b87d3ce

Browse files
committed
nml+cms: Update all update functions to use [u]int{8,16,32,64}_t types.
1 parent efe4ef2 commit b87d3ce

9 files changed

Lines changed: 224 additions & 205 deletions

File tree

src/libnml/cms/cms.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@ CMS_STATUS CMS::update(bool &x)
12921292
}
12931293
}
12941294

1295-
CMS_STATUS CMS::update(char &x)
1295+
CMS_STATUS CMS::update(int8_t &x)
12961296
{
12971297
if (NULL != updater) {
12981298
return (updater->update(x));
@@ -1301,7 +1301,7 @@ CMS_STATUS CMS::update(char &x)
13011301
}
13021302
}
13031303

1304-
CMS_STATUS CMS::update(unsigned char &x)
1304+
CMS_STATUS CMS::update(uint8_t &x)
13051305
{
13061306
if (NULL != updater) {
13071307
return (updater->update(x));
@@ -1310,7 +1310,7 @@ CMS_STATUS CMS::update(unsigned char &x)
13101310
}
13111311
}
13121312

1313-
CMS_STATUS CMS::update(short int &x)
1313+
CMS_STATUS CMS::update(int16_t &x)
13141314
{
13151315
if (NULL != updater) {
13161316
return (updater->update(x));
@@ -1319,7 +1319,7 @@ CMS_STATUS CMS::update(short int &x)
13191319
}
13201320
}
13211321

1322-
CMS_STATUS CMS::update(unsigned short int &x)
1322+
CMS_STATUS CMS::update(uint16_t &x)
13231323
{
13241324
if (NULL != updater) {
13251325
return (updater->update(x));
@@ -1328,7 +1328,7 @@ CMS_STATUS CMS::update(unsigned short int &x)
13281328
}
13291329
}
13301330

1331-
CMS_STATUS CMS::update(int &x)
1331+
CMS_STATUS CMS::update(int32_t &x)
13321332
{
13331333
if (NULL != updater) {
13341334
return (updater->update(x));
@@ -1337,7 +1337,7 @@ CMS_STATUS CMS::update(int &x)
13371337
}
13381338
}
13391339

1340-
CMS_STATUS CMS::update(unsigned int &x)
1340+
CMS_STATUS CMS::update(uint32_t &x)
13411341
{
13421342
if (NULL != updater) {
13431343
return (updater->update(x));
@@ -1391,7 +1391,7 @@ CMS_STATUS CMS::update(long double &x)
13911391
}
13921392
}
13931393

1394-
CMS_STATUS CMS::update(char *x, unsigned int len)
1394+
CMS_STATUS CMS::update(int8_t *x, unsigned int len)
13951395
{
13961396
if (NULL != updater) {
13971397
return (updater->update(x, len));
@@ -1400,7 +1400,7 @@ CMS_STATUS CMS::update(char *x, unsigned int len)
14001400
}
14011401
}
14021402

1403-
CMS_STATUS CMS::update(unsigned char *x, unsigned int len)
1403+
CMS_STATUS CMS::update(uint8_t *x, unsigned int len)
14041404
{
14051405
if (NULL != updater) {
14061406
return (updater->update(x, len));
@@ -1409,7 +1409,7 @@ CMS_STATUS CMS::update(unsigned char *x, unsigned int len)
14091409
}
14101410
}
14111411

1412-
CMS_STATUS CMS::update(short *x, unsigned int len)
1412+
CMS_STATUS CMS::update(int16_t *x, unsigned int len)
14131413
{
14141414
if (NULL != updater) {
14151415
return (updater->update(x, len));
@@ -1418,7 +1418,7 @@ CMS_STATUS CMS::update(short *x, unsigned int len)
14181418
}
14191419
}
14201420

1421-
CMS_STATUS CMS::update(unsigned short *x, unsigned int len)
1421+
CMS_STATUS CMS::update(uint16_t *x, unsigned int len)
14221422
{
14231423
if (NULL != updater) {
14241424
return (updater->update(x, len));
@@ -1427,7 +1427,7 @@ CMS_STATUS CMS::update(unsigned short *x, unsigned int len)
14271427
}
14281428
}
14291429

1430-
CMS_STATUS CMS::update(int *x, unsigned int len)
1430+
CMS_STATUS CMS::update(int32_t *x, unsigned int len)
14311431
{
14321432
if (NULL != updater) {
14331433
return (updater->update(x, len));
@@ -1436,7 +1436,7 @@ CMS_STATUS CMS::update(int *x, unsigned int len)
14361436
}
14371437
}
14381438

1439-
CMS_STATUS CMS::update(unsigned int *x, unsigned int len)
1439+
CMS_STATUS CMS::update(uint32_t *x, unsigned int len)
14401440
{
14411441
if (NULL != updater) {
14421442
return (updater->update(x, len));

src/libnml/cms/cms.hh

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -265,27 +265,28 @@ class CMS {
265265
/***********************************************/
266266
/* Access functions for primitive C language data types */
267267
CMS_STATUS update(bool &x);
268-
CMS_STATUS update(char &x); /* Used by emc2 */
269-
CMS_STATUS update(unsigned char &x); /* Used by emc2 */
270-
CMS_STATUS update(short int &x);
271-
CMS_STATUS update(unsigned short int &x);
272-
CMS_STATUS update(int &x); /* Used by emc2 */
273-
CMS_STATUS update(unsigned int &x);
274-
CMS_STATUS update(int64_t &x); /* Used by emc2 */
275-
CMS_STATUS update(uint64_t &x); /* Used by emc2 */
268+
CMS_STATUS update(int8_t &x);
269+
CMS_STATUS update(uint8_t &x);
270+
CMS_STATUS update(int16_t &x);
271+
CMS_STATUS update(uint16_t &x);
272+
CMS_STATUS update(int32_t &x);
273+
CMS_STATUS update(uint32_t &x);
274+
CMS_STATUS update(int64_t &x);
275+
CMS_STATUS update(uint64_t &x);
276276
CMS_STATUS update(float &x);
277-
CMS_STATUS update(double &x); /* Used by emc2 */
277+
CMS_STATUS update(double &x);
278278
CMS_STATUS update(long double &x);
279-
CMS_STATUS update(char *x, unsigned int len); /* Used by emc2 */
280-
CMS_STATUS update(unsigned char *x, unsigned int len); /* Used by emc2 */
281-
CMS_STATUS update(short *x, unsigned int len);
282-
CMS_STATUS update(unsigned short *x, unsigned int len);
283-
CMS_STATUS update(int *x, unsigned int len); /* Used by emc2 */
284-
CMS_STATUS update(unsigned int *x, unsigned int len);
279+
CMS_STATUS update(char *x, unsigned int len) { return update(reinterpret_cast<int8_t *>(x), len); };
280+
CMS_STATUS update(int8_t *x, unsigned int len);
281+
CMS_STATUS update(uint8_t *x, unsigned int len);
282+
CMS_STATUS update(int16_t *x, unsigned int len);
283+
CMS_STATUS update(uint16_t *x, unsigned int len);
284+
CMS_STATUS update(int32_t *x, unsigned int len);
285+
CMS_STATUS update(uint32_t *x, unsigned int len);
285286
CMS_STATUS update(int64_t *x, unsigned int len);
286287
CMS_STATUS update(uint64_t *x, unsigned int len);
287288
CMS_STATUS update(float *x, unsigned int len);
288-
CMS_STATUS update(double *x, unsigned int len); /* Used by emc2 */
289+
CMS_STATUS update(double *x, unsigned int len);
289290
CMS_STATUS update(long double *x, unsigned int len);
290291

291292
/*************************************************************************

0 commit comments

Comments
 (0)