aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2018-08-25 17:55:25 +0200
committerraysan5 <raysan5@gmail.com>2018-08-25 17:55:25 +0200
commitaf919e5c9fb99ace2386c6355d45f50f3e2d2d5a (patch)
tree972227324ab8250f20bbe356dc027c411660c4f6 /src
parentfe2f8d77a9b2d5ed459377dbdb79cd2c70196139 (diff)
downloadraylib-af919e5c9fb99ace2386c6355d45f50f3e2d2d5a.tar.gz
raylib-af919e5c9fb99ace2386c6355d45f50f3e2d2d5a.zip
Review naming to follow raylib conventions
strprbrk() does not follow raylib function name convention but as it is very similar to the standard strpbrk(), we'll keep the naming... also, don't like to mix static functions with API functions but as strprbrk() is just used in the two functions below, it's ok to be there... maybe it could be refactored in a future or even move the logic inside the required functions...
Diffstat (limited to 'src')
-rw-r--r--src/core.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core.c b/src/core.c
index ce510406..3cd75f64 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1346,13 +1346,12 @@ const char *GetExtension(const char *fileName)
return (dot + 1);
}
-/* "string pointer reverse break": return right-most occurrence of charset in s */
+// String pointer reverse break: returns right-most occurrence of charset in s
static const char *strprbrk(const char *s, const char *charset)
{
- const char *latest_match = NULL;
- for(; s = strpbrk(s, charset), s != NULL; latest_match=s++)
- ;
- return latest_match;
+ const char *latestMatch = NULL;
+ for (; s = strpbrk(s, charset), s != NULL; latestMatch = s++) { }
+ return latestMatch;
}
// Get pointer to filename for a path string