diff options
author | inmarket <andrewh@inmarket.com.au> | 2015-08-16 14:30:25 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2015-08-16 14:30:25 +1000 |
commit | 377fe644d1233e955dfd05e40fa9d335447de325 (patch) | |
tree | ebb811f67a0c34fffdf840c96267d46ea86d0178 /src/gdisp | |
parent | c451880d807cb07986cb3553e4424219166ced5e (diff) | |
download | uGFX-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.c | 8 | ||||
-rw-r--r-- | src/gdisp/gdisp.h | 2 |
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 * |