fix thinko in use of sizeof() for bitshifting
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 17 May 2016 19:03:53 +0000 (15:03 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 31 May 2016 19:30:43 +0000 (15:30 -0400)
libs/ardour/ardour/presentation_info.h

index f7446a7713f0c9e33cccba599d1952038891ffc9..465371005b5041700193e30880ad121db23c4d21 100644 (file)
@@ -179,7 +179,7 @@ class LIBARDOUR_API PresentationInfo
 
                           these translate into the following
 
-                          _order  |  _flags            | order()
+                          _order  |  _flags            | global_order()
                           --------------------------------------
                           1       |   0x1   AudioTrack | ((0x1|0x2|0x4|0x8)<<32)|1 = 64424509441
                           2       |   0x2   AudioBus   | ((0x1|0x2|0x4|0x8)<<32)|2 = 64424509442
@@ -193,9 +193,9 @@ class LIBARDOUR_API PresentationInfo
 
                        */
 
-                       return (((global_order_t) (_flags | Route)) << sizeof(order_t)) | _order;
+                       return (((global_order_t) (_flags | Route)) << (8*sizeof(order_t))) | _order;
                } else {
-                       return (((global_order_t) _flags) << sizeof(order_t)) | _order;
+                       return (((global_order_t) _flags) << (8*sizeof(order_t))) | _order;
                }
        }
 
@@ -257,7 +257,7 @@ class LIBARDOUR_API PresentationInfo
        std::string to_string () const;
 
        uint64_t to_integer () const {
-               return ((uint64_t) _flags << sizeof(order_t)) | _order;
+               return ((uint64_t) _flags << (8*sizeof(order_t))) | _order;
        }
 
        bool operator< (PresentationInfo const& other) const {