Skip to content

Commit

Permalink
Per #2880, add a write_css(IntArray) utility function.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway committed Oct 1, 2024
1 parent 58b3463 commit baa5af1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/basic/vx_util/crc_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <vector>

#include "num_array.h"
#include "int_array.h"
#include "is_bad_data.h"
#include "nint.h"
#include "vx_cal.h"
Expand Down
8 changes: 6 additions & 2 deletions src/basic/vx_util/int_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

#include <iostream>

#include "num_array.h"

#include "crc_array.h"


Expand All @@ -34,6 +32,12 @@ typedef CRC_Array<int> IntArray;
////////////////////////////////////////////////////////////////////////


extern ConcatString write_css(const IntArray &);


////////////////////////////////////////////////////////////////////////


#endif /* __INT_ARRAY_H__ */


Expand Down
20 changes: 20 additions & 0 deletions src/basic/vx_util/num_array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include "num_array.h"

#include "int_array.h"
#include "is_bad_data.h"
#include "ptile.h"
#include "nint.h"
Expand Down Expand Up @@ -1382,3 +1383,22 @@ ConcatString write_css_hhmmss(const NumArray &na)


////////////////////////////////////////////////////////////////////////


ConcatString write_css(const IntArray &ia)

{

ConcatString css;

for ( int i=0; i<ia.n(); ++i ) {
css << (i == 0 ? "" : ",") << ia[i];
}

return css;

}


////////////////////////////////////////////////////////////////////////

0 comments on commit baa5af1

Please sign in to comment.