aboutsummaryrefslogtreecommitdiffstats
path: root/src/gdisp
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2015-08-16 14:30:25 +1000
committerinmarket <andrewh@inmarket.com.au>2015-08-16 14:30:25 +1000
commit377fe644d1233e955dfd05e40fa9d335447de325 (patch)
treeebb811f67a0c34fffdf840c96267d46ea86d0178 /src/gdisp
parentc451880d807cb07986cb3553e4424219166ced5e (diff)
downloaduGFX-377fe644d1233e955dfd05e40fa9d335447de325.tar.gz
uGFX-377fe644d1233e955dfd05e40fa9d335447de325.tar.bz2
uGFX-377fe644d1233e955dfd05e40fa9d335447de325.zip
Coding style, comments, duplicate symbols and other minor fixes
Diffstat (limited to 'src/gdisp')
-rw-r--r--src/gdisp/gdisp.c8
-rw-r--r--src/gdisp/gdisp.h2
2 files changed, 2 insertions, 8 deletions
diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c
index 6e431441..0ddee1f6 100644
--- a/src/gdisp/gdisp.c
+++ b/src/gdisp/gdisp.c
@@ -3325,9 +3325,8 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
}
coord_t gdispGetStringWidthCount(const char* str, font_t font, uint16_t count) {
- if (!str) {
+ if (!str)
return 0;
- }
// No mutex required as we only read static data
#if GDISP_NEED_TEXT_KERNING
@@ -3338,11 +3337,6 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
}
coord_t gdispGetStringWidth(const char* str, font_t font) {
- if (!str) {
- return 0;
- }
-
- // No mutex required as we only read static data
return gdispGetStringWidthCount(str, font, 0);
}
#endif
diff --git a/src/gdisp/gdisp.h b/src/gdisp/gdisp.h
index 1ff15e44..d0c31ebb 100644
--- a/src/gdisp/gdisp.h
+++ b/src/gdisp/gdisp.h
@@ -978,7 +978,7 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
coord_t gdispGetCharWidth(char c, font_t font);
/**
- * @brief Get the pixel width of a string of a given length.
+ * @brief Get the pixel width of a string of a given character length.
* @return The width of the string in pixels.
* @pre GDISP_NEED_TEXT must be TRUE in your gfxconf.h
*