Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-06-30 09:37:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-06-30 09:42:19 +0300
commit501d2443d03cce18985fab3ffad5d23238748f3e (patch)
tree1d127d4e4c6d82fc85feedc9826dd5619174e346 /source/blender/blenlib/intern/BLI_dynstr.c
parentdf9597cfba78deb40009553ab9dcf09c21edd434 (diff)
Cleanup: use const arguments for accessor functions
Diffstat (limited to 'source/blender/blenlib/intern/BLI_dynstr.c')
-rw-r--r--source/blender/blenlib/intern/BLI_dynstr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/BLI_dynstr.c b/source/blender/blenlib/intern/BLI_dynstr.c
index 5255e8b9902..86784557b25 100644
--- a/source/blender/blenlib/intern/BLI_dynstr.c
+++ b/source/blender/blenlib/intern/BLI_dynstr.c
@@ -283,7 +283,7 @@ void BLI_dynstr_appendf(DynStr *__restrict ds, const char *__restrict format, ..
* \param ds: The DynStr of interest.
* \return The length of \a ds.
*/
-int BLI_dynstr_get_len(DynStr *ds)
+int BLI_dynstr_get_len(const DynStr *ds)
{
return ds->curlen;
}
@@ -296,10 +296,10 @@ int BLI_dynstr_get_len(DynStr *ds)
* \param ds: The DynStr of interest.
* \param rets: The string to fill.
*/
-void BLI_dynstr_get_cstring_ex(DynStr *__restrict ds, char *__restrict rets)
+void BLI_dynstr_get_cstring_ex(const DynStr *__restrict ds, char *__restrict rets)
{
char *s;
- DynStrElem *dse;
+ const DynStrElem *dse;
for (s = rets, dse = ds->elems; dse; dse = dse->next) {
int slen = strlen(dse->str);
@@ -320,7 +320,7 @@ void BLI_dynstr_get_cstring_ex(DynStr *__restrict ds, char *__restrict rets)
* \param ds: The DynStr of interest.
* \return The contents of \a ds as a c-string.
*/
-char *BLI_dynstr_get_cstring(DynStr *ds)
+char *BLI_dynstr_get_cstring(const DynStr *ds)
{
char *rets = MEM_mallocN(ds->curlen + 1, "dynstr_cstring");
BLI_dynstr_get_cstring_ex(ds, rets);