summaryrefslogtreecommitdiff
path: root/palettes.c
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-04-25 12:17:12 +0200
committerLars-Dominik Braun <lars@6xq.net>2015-05-02 21:36:45 +0200
commit99f384b4d61dbde135d63fad7f89c3451ec2e4c0 (patch)
treef6b782c1520e068d572d98359498d746a6f7355d /palettes.c
parent697f57743e560fad2264b7a2039795432ca5b3a8 (diff)
downloadpucket-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/palettes.c b/palettes.c
index 92ddc79..1e927e4 100644
--- a/palettes.c
+++ b/palettes.c
@@ -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);