summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-03-07 03:20:38 +0000
committerBrian Paul <[email protected]>2001-03-07 03:20:38 +0000
commit90ea5261149f74ca81c723c00b5883209952d1d8 (patch)
tree1e973d0351493db5f87f0efce75f3f3159ddb676
parentbe3d539dac3948458931be63fa3e97e072871550 (diff)
added some casts in the 16-bit GLchan macros, just to be safe
-rw-r--r--src/mesa/main/colormac.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h
index 94e4af51ece..d26420132a9 100644
--- a/src/mesa/main/colormac.h
+++ b/src/mesa/main/colormac.h
@@ -1,10 +1,10 @@
-/* $Id: colormac.h,v 1.6 2001/01/03 15:59:30 brianp Exp $ */
+/* $Id: colormac.h,v 1.7 2001/03/07 03:20:38 brianp Exp $ */
/*
* Mesa 3-D graphics library
* Version: 3.5
*
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -63,8 +63,8 @@
#elif CHAN_BITS == 16
-#define BYTE_TO_CHAN(b) ((b) < 0 ? 0 : (GLchan) ((b) * 516))
-#define UBYTE_TO_CHAN(b) ((GLchan) (((b) << 8) | (b)))
+#define BYTE_TO_CHAN(b) ((b) < 0 ? 0 : (((GLchan) (b)) * 516))
+#define UBYTE_TO_CHAN(b) ((((GLchan) (b)) << 8) | ((GLchan) (b)))
#define SHORT_TO_CHAN(s) ((s) < 0 ? 0 : (GLchan) (s))
#define USHORT_TO_CHAN(s) (s)
#define INT_TO_CHAN(i) ((i) < 0 ? 0 : (GLchan) ((i) >> 15))