summaryrefslogtreecommitdiff
path: root/cogl/cogl-util.c
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2010-09-15 14:39:05 +0100
committerNeil Roberts <neil@linux.intel.com>2010-09-15 15:01:43 +0100
commit583d5cc79f2a00ac6e9ac93253f9cfdb528830a2 (patch)
tree1580d3ec555daa650937c93bdadf9cd26e6669d6 /cogl/cogl-util.c
parenta433bd8e9e732016e03ced0bc7ab57ee44c54620 (diff)
downloadcogl-583d5cc79f2a00ac6e9ac93253f9cfdb528830a2.tar.gz
cogl: Make cogl_util_next_p2 internal and fix the documentation
cogl_util_next_p2 is declared in cogl-util.h which is a private header so it shouldn't be possible for an application to use it. It's probably not a function we'd like to export from Cogl so it seems better to keep it private. This patch renames it to _cogl_util_next_p2 so that it won't be exported from the shared library. The documentation for the function is also slightly wrong because it stated that the function returned the next power greater than 'a'. However the code would actually return 'a' if it's already a power of two. I think the actual behaviour is more useful so this patch changes the documentation rather than the code.
Diffstat (limited to 'cogl/cogl-util.c')
-rw-r--r--cogl/cogl-util.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/cogl/cogl-util.c b/cogl/cogl-util.c
index 369017b8..f6d3709f 100644
--- a/cogl/cogl-util.c
+++ b/cogl/cogl-util.c
@@ -40,16 +40,17 @@
#include "cogl-handle.h"
#include "cogl-util.h"
-/**
+/*
* cogl_util_next_p2:
- * @a: Value to get the next power
+ * @a: Value to get the next power of two
*
- * Calculates the next power greater than @a.
+ * Calculates the next power of two greater than or equal to @a.
*
- * Return value: The next power after @a.
+ * Return value: @a if @a is already a power of two, otherwise returns
+ * the next nearest power of two.
*/
int
-cogl_util_next_p2 (int a)
+_cogl_util_next_p2 (int a)
{
int rval = 1;