File: fix-gtk-progress.patch

package info (click to toggle)
transmission 4.1.0~beta2%2Bdfsg-3%2Bdeb13u1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 39,812 kB
  • sloc: cpp: 146,009; javascript: 5,801; ansic: 4,119; xml: 550; sh: 477; python: 213; makefile: 75
file content (28 lines) | stat: -rw-r--r-- 806 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Alexandre Rossi <alexandre.rossi@gmail.com>
Date: Mon, 16 Jun 2025 14:33:18 +0100
Subject: unbreak ChangeFlag bitwise operations

Forwarded: https://github.com/transmission/transmission/pull/7613

Upstream fix: #7572

8 bits is not enough to do bitwise comparisons on more than 8 independent
values.
---
 gtk/Torrent.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gtk/Torrent.h b/gtk/Torrent.h
index c289e57..c26f0d9 100644
--- a/gtk/Torrent.h
+++ b/gtk/Torrent.h
@@ -39,7 +39,8 @@ public:
         Gtk::TreeModelColumn<Glib::ustring> name_collated;
     };
 
-    enum class ChangeFlag : uint8_t
+    // wider type required because of bitwise operations on underlying type
+    enum class ChangeFlag : uint32_t
     {
         ACTIVE_PEER_COUNT,
         ACTIVE_PEERS_DOWN,