Skip to content

Commit 6e0a0dc

Browse files
committed
remove commconstants.cpp, use inline for declaring const std::string in commconstants.h
1 parent f35de4e commit 6e0a0dc

File tree

2 files changed

+15
-42
lines changed

2 files changed

+15
-42
lines changed

vpr/src/server/commconstants.cpp

Lines changed: 0 additions & 27 deletions
This file was deleted.

vpr/src/server/commconstants.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@
77

88
namespace comm {
99

10-
extern const std::string KEY_JOB_ID;
11-
extern const std::string KEY_CMD;
12-
extern const std::string KEY_OPTIONS;
13-
extern const std::string KEY_DATA;
14-
extern const std::string KEY_STATUS;
15-
extern const std::string ECHO_DATA;
10+
inline const std::string KEY_JOB_ID{"JOB_ID"};
11+
inline const std::string KEY_CMD{"CMD"};
12+
inline const std::string KEY_OPTIONS{"OPTIONS"};
13+
inline const std::string KEY_DATA{"DATA"};
14+
inline const std::string KEY_STATUS{"STATUS"};
15+
inline const std::string ECHO_DATA{"ECHO"};
1616

1717
const unsigned char ZLIB_COMPRESSOR_ID = 'z';
1818
const unsigned char NONE_COMPRESSOR_ID = '\x0';
1919

20-
extern const std::string OPTION_PATH_NUM;
21-
extern const std::string OPTION_PATH_TYPE;
22-
extern const std::string OPTION_DETAILS_LEVEL;
23-
extern const std::string OPTION_IS_FLAT_ROUTING;
24-
extern const std::string OPTION_PATH_ELEMENTS;
25-
extern const std::string OPTION_HIGHLIGHT_MODE;
26-
extern const std::string OPTION_DRAW_PATH_CONTOUR;
20+
inline const std::string OPTION_PATH_NUM{"path_num"};
21+
inline const std::string OPTION_PATH_TYPE{"path_type"};
22+
inline const std::string OPTION_DETAILS_LEVEL{"details_level"};
23+
inline const std::string OPTION_IS_FLAT_ROUTING{"is_flat_routing"};
24+
inline const std::string OPTION_PATH_ELEMENTS{"path_elements"};
25+
inline const std::string OPTION_HIGHLIGHT_MODE{"high_light_mode"};
26+
inline const std::string OPTION_DRAW_PATH_CONTOUR{"draw_path_contour"};;
2727

28-
extern const std::string KEY_SETUP_PATH_LIST;
29-
extern const std::string KEY_HOLD_PATH_LIST;
28+
inline const std::string KEY_SETUP_PATH_LIST{"setup"};
29+
inline const std::string KEY_HOLD_PATH_LIST{"hold"};
3030

3131
enum CMD {
3232
CMD_GET_PATH_LIST_ID=0,

0 commit comments

Comments
 (0)