Qt Code:
QHash<int,int> lookUp; lookup[-40] = 289; lookup[-39] = 292; // etc.To copy to clipboard, switch view to plain text mode
or using a static C array:
Qt Code:
int valueFor(int v) { static int lookup[] = { 289, 292, 294, ... }; return lookup[v+40]; }To copy to clipboard, switch view to plain text mode





Reply With Quote
Bookmarks