diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2015-04-25 12:17:12 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2015-05-02 21:36:45 +0200 |
commit | 99f384b4d61dbde135d63fad7f89c3451ec2e4c0 (patch) | |
tree | f6b782c1520e068d572d98359498d746a6f7355d /palettes.c | |
parent | 697f57743e560fad2264b7a2039795432ca5b3a8 (diff) | |
download | pucket-99f384b4d61dbde135d63fad7f89c3451ec2e4c0.tar.gz pucket-99f384b4d61dbde135d63fad7f89c3451ec2e4c0.tar.bz2 pucket-99f384b4d61dbde135d63fad7f89c3451ec2e4c0.zip |
Store pointer to array element once
Instead of indexing the array over and over
Diffstat (limited to 'palettes.c')
-rw-r--r-- | palettes.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -120,7 +120,7 @@ const palette *palette_random (const palette_collection * const pc, return &pc->p[i]; } -void palette_copy (const palette * const src, palette * const dest) { +void palette_copy (const palette * restrict const src, palette * restrict const dest) { dest->count = src->count; int ret = posix_memalign ((void **) &dest->color, sizeof (*dest->color), sizeof (*dest->color) * dest->count); |