A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[sonar] Constify pointer and reference parameters in dicts and dynars.
[simgrid.git]
/
include
/
xbt
/
dict.h
diff --git
a/include/xbt/dict.h
b/include/xbt/dict.h
index
e36d2b9
..
73b6e62
100644
(file)
--- a/
include/xbt/dict.h
+++ b/
include/xbt/dict.h
@@
-45,6
+45,7
@@
SG_BEGIN_DECL
/** @brief Dictionary data type (opaque structure) */
typedef struct s_xbt_dict *xbt_dict_t;
/** @brief Dictionary data type (opaque structure) */
typedef struct s_xbt_dict *xbt_dict_t;
+typedef const struct s_xbt_dict* const_xbt_dict_t;
typedef struct s_xbt_dictelm *xbt_dictelm_t;
typedef struct s_xbt_dictelm {
char *key;
typedef struct s_xbt_dictelm *xbt_dictelm_t;
typedef struct s_xbt_dictelm {
char *key;
@@
-124,8
+125,10
@@
struct s_xbt_dict_cursor {
/** @brief Cursor on dictionaries (opaque type) */
typedef struct s_xbt_dict_cursor *xbt_dict_cursor_t;
/** @brief Cursor on dictionaries (opaque type) */
typedef struct s_xbt_dict_cursor *xbt_dict_cursor_t;
+typedef const struct s_xbt_dict_cursor* const_xbt_dict_cursor_t;
-static inline xbt_dictelm_t xbt_dict_cursor_get_elm(xbt_dict_cursor_t cursor) {
+static inline xbt_dictelm_t xbt_dict_cursor_get_elm(const_xbt_dict_cursor_t cursor)
+{
return cursor->current;
}
return cursor->current;
}