Commit Graph

5 Commits

Author SHA1 Message Date
Kevin Shanahan
580204e255 model: fix const correctness of ConstBrushModel internals
Couldn't find a neat way to make the container_of macro const agnostic, so
just have a const and non-const version.  Silences a bunch of -Wcast-qual
warnings so that real problems are easier to spot.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2013-04-24 16:19:04 +09:30
Kevin Shanahan
f569b16c0e draw: add argument completion for gl_texturemode command
Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-12-22 15:20:36 +10:30
Kevin Shanahan
850cb61cb5 define offsetof if not already defined
Not sure where I was getting the macro from before, but fix compilation of
pmove.c by defining offsetof when it's not already defined. Must have been
getting it from a system header previously...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
2012-11-16 14:37:15 +10:30
Tyrann
fac0307756 [PATCH] Introduce container_of macro
Introduce a new macro "container_of" to convert a member point to a point to
the containing struct with relative type saftey. Stolen from Linux. I'd rather
this was in a different header to "qtypes.h", but that's the best place for it
at the moment, without creating a new header.

Replace the cvar_for_completion macro and add helper functions stree_entry and
completion_entry to remove the rb_entry macro. This ends up looking a bit
neater.

Signed-off-by: Tyrann <tyrann@disenchant.net>
2006-09-10 19:12:23 +09:30
Tyrann
130e22195a Import v0.47 sources 2006-09-10 19:02:51 +09:30