Skip to content

Instantly share code, notes, and snippets.

@Oldes
Created February 27, 2019 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Oldes/c9815269ce124ef23ebde74e0877e004 to your computer and use it in GitHub Desktop.
Save Oldes/c9815269ce124ef23ebde74e0877e004 to your computer and use it in GitHub Desktop.
StringCache
https://gitter.im/blend2d/b2d?at=5c76b021e8ea143737842e2f
struct StringCache {
#define ENTRY(ID, NAME, CONTENT) \
struct NAME { \
enum { kId = ID }; \
char str[sizeof(CONTENT)] = CONTENT; \
}
ENTRY(0, id, "id");
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment