[Pkg-wmaker-commits] [wmbubble] 55/207: draw_cpudigit: use memcpy which gcc understands better again.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 24 04:18:02 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmbubble.

commit f8b3df25897f09deb166b411a2ef6e7bf25978c2
Author: Robert Jacobs <rnjacobs at mit.edu>
Date:   Tue Aug 2 21:38:37 2011 -0700

    draw_cpudigit: use memcpy which gcc understands better again.
---
 bubblemon.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/bubblemon.c b/bubblemon.c
index e33d73b..ee6c258 100644
--- a/bubblemon.c
+++ b/bubblemon.c
@@ -995,14 +995,12 @@ void roll_history(void)  {
 }
 
 void draw_cpudigit(int what, unsigned char *whither) {
-	unsigned int len, y;
-	unsigned char *to, *from;
+	unsigned int y;
+	unsigned char *from = digits + what * 3 * 6;;
 	for (y = 0; y < 9; y++) { /* magic numbers suck. */
-		len = 7*3;
-		to = whither + y * 3*25;
-		from = digits + y * 3*95 + what*3*6;
-		while (len--)
-			*to++ = *from++;
+		memcpy(whither,from,21);
+		whither += 3*25;
+		from += 3*95;
 	}
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbubble.git



More information about the Pkg-wmaker-commits mailing list