Julien
8ac323d5d6
chore: removed copyright timespans in headers ( #4850 )
2023-11-01 16:11:11 -05:00
tearfur
5ec4ca550e
chore: iwyu ( #5746 )
2023-07-08 10:24:03 -05:00
Charles Kerr
9d2507c7e3
refactor: snake_case in libtransmission class methods ( #5428 )
2023-04-22 20:25:55 -05:00
Charles Kerr
a982c96518
fix: assertion failed leftUntilDone <= sizeWhenDone ( #4879 )
2023-02-13 19:51:23 -06:00
Julien
4b8cfa2e57
chore: update copyrights to 2023 ( #4834 )
2023-02-11 14:49:42 -06:00
Charles Kerr
c75f9a4a7a
refactor: tidy libtransmission symbol visibility ( #4680 )
2023-01-27 14:25:08 -06:00
Charles Kerr
2d2a5e1ad6
refactor: more constexpr ( #4518 )
2023-01-02 11:34:36 -06:00
Charles Kerr
ea05474464
perf: make methods constexpr ( #3742 )
2022-08-30 23:17:23 -05:00
Charles Kerr
83ffa6bf1b
chore: fix spdx abbreviations ( #3602 )
2022-08-08 13:05:39 -05:00
Charles Kerr
dab81c1af6
fix: readability-inconsistent-declaration-parameter-name warnings in libtransmission ( #3572 )
2022-08-03 01:15:37 -05:00
Charles Kerr
513f4bc91b
fix: assertion failed "s->leftUntilDone <= s->sizeWhenDone" ( #3406 )
2022-07-04 11:48:54 -05:00
Charles Kerr
9f9f60f1e3
refactor: tr_block_info ( #2908 )
2022-04-13 20:22:59 -05:00
Charles Kerr
80dd460773
refactor: annotate nodiscard, constexpr, noexcept methods ( #2879 )
2022-04-04 22:51:56 -05:00
Charles Kerr
ca5799a4a8
refactor: annotate nodiscard, constexpr, noexcept methods ( #2862 )
2022-04-01 19:48:09 -05:00
Charles Kerr
2f677aebb0
refactor: add tracer assertionf or bug #2727 ( #2836 )
2022-03-28 23:29:35 -05:00
Charles Kerr
f87d737e0f
feat: newly-added seeds skip the full verify step ( #2626 )
...
* feat: newly-added seeds skip the full verify step
This has been a much-requested feature but has also been contentious
because I want to ensure that Transmission never transmits unverified
data. See the GH pull request for context on how this works.
2022-02-14 13:17:51 -06:00
Charles Kerr
df1cca9b57
chore: update copyright years, make notices consistent ( #2463 )
2022-01-20 12:27:56 -06:00
Charles Kerr
fd96a9270b
refactor: remove tr_file.offset ( #2347 )
2021-12-26 12:43:27 -06:00
Charles Kerr
42b1362760
refactor: tidy libtransmission includes ( #2316 )
2021-12-15 15:25:42 -06:00
Charles Kerr
1c848cf174
refactor: add tr_info accessors to tr_torrent ( #2314 )
...
* refactor: add tr_info accessors to tr_torrent
2021-12-15 09:53:20 -06:00
Charles Kerr
d00be0dec7
refactor: tr_torrentIsSeed() -> tr_torrent::isDone() ( #2313 )
2021-12-15 01:04:26 -06:00
Charles Kerr
35fe175f2a
refactor: add file-piece-map ( #2246 )
...
* refactor: add file-piece-map
* refactor: use tr_file_priorities
* refactor: use tr_files_wanted
2021-11-28 19:12:54 -06:00
Charles Kerr
f6f0db75e1
fix: sonarcloud warnings / code smells ( #2242 )
...
* fix: use-init-statement
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX1f6EvHJiycnfA7gfrG\&open\=AX1f6EvHJiycnfA7gfrG
* fix replace-use-of-new warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX1ZNs41ZmlvCveKTzon\&open\=AX1ZNs41ZmlvCveKTzon
* fix has-virtual-functions-but-non-virtual-destructor warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX1ZNs72ZmlvCveKTzo6\&open\=AX1ZNs72ZmlvCveKTzo6
* fix make-variable-const warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0_a_OVNJn7rAzml_7B\&open\=AX0_a_OVNJn7rAzml_7B
* fix remove-redundant-static-specifiers
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX06St-81usi2gyYkPTb\&open\=AX06St-81usi2gyYkPTb
* fix function-should-be-declared-const
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX06St-81usi2gyYkPTd\&open\=AX06St-81usi2gyYkPTd
* fix use-init-statement warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX06St-81usi2gyYkPTc\&open\=AX06St-81usi2gyYkPTc
* fix class-has-virtual-functions-but-non-virtual-destructor warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX06Stz41usi2gyYkPTS\&open\=AX06Stz41usi2gyYkPTS
* fix remove-commented-out-code warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX06St241usi2gyYkPTT\&open\=AX06St241usi2gyYkPTT
* fix remove-commented-out-code warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX06St241usi2gyYkPTV\&open\=AX06St241usi2gyYkPTV
* fix has-virtual-functions-but-non-virtual-destructor warning
https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX06St241usi2gyYkPTW\&open\=AX06St241usi2gyYkPTW
* fix remove-commented-out-code warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX06SuCA1usi2gyYkPTh\&open\=AX06SuCA1usi2gyYkPTh
* fix use-init-statement warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0rAQvnfJ-O-YIDS9xF\&open\=AX0rAQvnfJ-O-YIDS9xF
* fix use-init-statement warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0rAQvnfJ-O-YIDS9xG\&open\=AX0rAQvnfJ-O-YIDS9xG
* fix remove-redundant-access-specifier warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX1ZNs5tZmlvCveKTzor\&open\=AX1ZNs5tZmlvCveKTzor
* fix use-init-statement warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX01Itl7f_SST5i7BN1l\&open\=AX01Itl7f_SST5i7BN1l
* fix use-init-statement warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0wDijI2l89lDvp1C9P\&open\=AX0wDijI2l89lDvp1C9P
* fix use-automatically-managed-memory-instead-of-new warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX1f6E6HJiycnfA7gfrI\&open\=AX1f6E6HJiycnfA7gfrI
* fix use-init-statement warning
Xref: https://sonarcloud.io/project/issues\?id\=transmission_transmission\&issues\=AX0l8vknEafnvRiIHUEv\&open\=AX0l8vknEafnvRiIHUEv
* fixup! fix has-virtual-functions-but-non-virtual-destructor warning
2021-11-27 19:58:35 -06:00
Charles Kerr
de169c7ec3
refactor: tr_completion ( #2220 )
...
* refactor: refactor tr_completion + add test coverage for it
2021-11-25 12:26:51 -06:00
Charles Kerr
d8b57fe4dc
refactor: web_utils ( #2121 )
...
* chore: move web utils from web, utils to web-utils
2021-11-08 21:30:03 -06:00
Charles Kerr
3008a992ca
fix: Bitfield.getRaw() regression ( #2023 )
...
* fix: Bitfield.getRaw() regression
2021-10-24 15:43:36 -05:00
Dmytro Lytovchenko
953f07375a
Modernize bitfield.cc: Storage changes and refactor ( #1927 )
...
* Modernize bitfield.cc: Storage changed to vector of bytes, return vector from getRaw, new Span readonly memory view
Modernize bitfield.cc: Code style/review notes
Modernize bitfield.cc: Code format
* Modernize bitfield.cc: Swap end and begin in bit counting code assertion
* Modernize bitfield.cc: Rewrite states and simplify code
* Modernize bitfield.cc: Fixing the code and tests
* Modernize bitfield.cc: Fixing tests
* Modernize bitfield.cc: Formatting; +std::size, +const
2021-10-16 09:04:19 -05:00
Dmytro Lytovchenko
39376f2105
Modernize/bitfield.cc: Make into C++ ( #1917 )
...
* Modernize bitfield.cc: Grouped member functions into the struct; C++ construction
* Modernize bitfield.cc: Naming style similar to qt/ C++ source
* Modernize bitfield.cc: Bitfield test updated to new API
* Modernize bitfield.cc: Renames for private functions
* Modernize bitfield.cc: Formatting
* Modernize bitfield.cc: Remove struct in 'struct Bitfield' and update commented code too
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-10-11 12:29:14 -05:00
Charles Kerr
83f21b8e0e
refactor: prefer constexpr functions over static inline ones ( #1887 )
...
* refactor: prefer constexpr functions over static inline ones
2021-10-06 17:24:04 -05:00
Charles Kerr
cc204e0b2c
refactor: prefer "using" over "typedef" ( #1883 )
...
* refactor: prefer "using" over "typedef"
2021-10-06 09:26:07 -05:00
Mike Gelfand
db3d40d0ed
Switch to clang-format for code formatting, include Mac client
2021-08-16 00:38:29 +03:00
Mike Gelfand
5b29fe1556
Ensure include guard is the first non-comment line
2017-11-14 23:21:28 +03:00
Mike Gelfand
4f9d9ad92b
Code style change leftovers
...
For some reason, GTK client wasn't fully processed. All the rest of changes
are mostly in comments.
2017-04-21 10:40:57 +03:00
Mike Gelfand
dadffa2c0f
Align type qualifiers to the right (code style)
...
This way all the qualifiers (`const`, `volatile`, `mutable`) are grouped
together, e.g. `T const* const x` vs. `const T* const x`. Also helps reading
types right-to-left, e.g. "constant pointer to constant T" vs. "constant
pointer to T which is constant".
2017-04-20 19:53:20 +03:00
Mike Gelfand
d7930984ef
Adjust uncrustify config, reformat all but Mac client
...
There're places where manual intervention is still required as uncrustify
is not ideal (unfortunately), but at least one may rely on it to do the
right thing most of the time (e.g. when sending in a patch).
The style itself is quite different from what we had before but making it
uniform across all the codebase is the key. I also hope that it'll make the
code more readable (YMMV) and less sensitive to further changes.
2017-04-20 10:01:22 +03:00
Mike Gelfand
2248d3670f
Get rid of $Id$ SVN keywords in source files
2016-09-02 23:10:15 +03:00
Jordan Lee
1af60ad6ad
use '#pragma once' instead of #ifndef..#define..#endif guards
2016-03-29 16:37:21 +00:00
Jordan Lee
02cff80c2d
Copyedit the license's revised text: (1) remove unnecessary repitition use of the word 'license' from the top of the header and source files (2) add the standard 'we hope it's useful, but no warranty' clause to COPYING (3) make explicit that linking OpenSSL is allowed (see https://people.gnome.org/~markmc/openssl-and-the-gpl.html for background) (4) sync the Qt and GTK+ clients' license popups with COPYING's revised text
2014-01-21 03:10:30 +00:00
Jordan Lee
4b9626bb83
Licensing changes:
...
1. add the option the code to be used under GPLv2 or GPLv3; previously only GPLv2 was allowed
2. add the "proxy option" as described in GPLv3 so we can add future licenses without having to bulk-edit everything again :)
3. remove the awkward "exception for MIT code in Mac client" clause; it was unnecessary and confusing.
2014-01-19 01:09:44 +00:00
Jordan Lee
4904b923fb
(trunk) restore copyright year as suggested in email by rms
2014-01-18 20:56:57 +00:00
Jordan Lee
35638e210e
add inline wrapper functions to tr_torrent to decouple the rest of the code from tr_completion
2013-08-18 13:06:39 +00:00
Jordan Lee
a8f965b489
(trunk libT) #5444 'underflow in bitfield.c's set_all_true()' -- fixed
2013-07-29 04:19:15 +00:00
Jordan Lee
3d38723ad9
Follow more common whitespace style conventions in the C code (libtransmission, daemon, utils, cli, gtk).
2012-12-05 17:29:46 +00:00
Jordan Lee
e9e76fa970
(trunk libT) #4888 : when scraping magnet links, don't send a left=0 argument to the tracker.
2012-05-20 14:14:59 +00:00
Jordan Lee
4857e8ebb1
(trunk libT) add several more tr_completion assertions to smoke out the (sizeWhenDone() < sizeNow()) error reported in the forums
2011-09-26 06:18:48 +00:00
Jordan Lee
3660c44934
(trunk libT) handle situations where we don't know the bitfield's upper bound in advance. This comes up sometimes with magnet links.
2011-03-30 04:14:57 +00:00
Jordan Lee
947134bbb3
(trunk libT) more completion and bitfield cleanup: (1) fix regression in tr_cpSizeWhenDone() reported by Waldorf, (2) make simple one-liner functions inlined
2011-03-29 01:17:18 +00:00
Jordan Lee
83c0e4f011
(trunk libT) break the mac build and introduce new crashes.
...
This is partially to address #4145 "Downloads stuck at 100%" by refactoring the bitset, bitfield, and tr_completion; however, the ripple effect is larger than usual so things may get worse in the short term before getting better.
livings124: to fix the mac build, remove bitset.[ch] from xcode
2011-03-28 16:31:05 +00:00
Jordan Lee
b4d36aeb54
(trunk) #4138 "use stdbool.h instead of tr_bool" -- done.
2011-03-22 15:19:54 +00:00
Jordan Lee
2b9db3c242
(trunk libT) #4048 "use bitsets instead of bitfield in tr_completion" -- done.
...
Excuse the sprawl. Much of this didn't fit into self-contained commits.
2011-02-23 03:54:04 +00:00