From df6393be75b8b09184426269135e031bda0e8621 Mon Sep 17 00:00:00 2001 From: "Dmitrij D. Czarkoff" Date: Sun, 23 Oct 2016 03:32:58 +0200 Subject: Simplify hex color parser It is actually a trivial task for strtoul + some bit shifting, so there is no need for two separate functions. --- src/util.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/util.h') diff --git a/src/util.h b/src/util.h index 039d55f..652c5be 100644 --- a/src/util.h +++ b/src/util.h @@ -27,10 +27,6 @@ size_t read_from_stdin(void **buffer); /* Creates a new SDL_Texture* containing a chequeboard texture */ SDL_Texture *create_chequered(SDL_Renderer *renderer); -/* Parses a triplet of hexadecimal bytes. Writes values to r, g, and b. */ -int parse_hex_color(const char* str, - unsigned char *r, unsigned char *g, unsigned char *b); - /* Loads a font using SDL2_ttf given a spec in the format "name:size" */ TTF_Font *load_font(const char *font_spec); -- cgit v1.2.3