Commit Graph

15 Commits

Author SHA1 Message Date
Antoine Cœur bdac708762
docs: fix various typos and misspellings (#2955) 2022-04-21 09:28:38 -05:00
Charles Kerr a250690f30
fix: sonarcloud (#2860)
* fix: break will never be executed

* fix: rewrite rimraf() to be non-throwing

* fix: conditional operation returns same value whether condition is true or false

* fix: use std::array instead of a C-style array

* fix: remove redundant access specifier

* fix: replace switch with if for readability

* fix: convert integer literal to a bool literal

* fix: replace const std::string reference to std::string_view

* fix: remove redundant access specifier

* fix: replace const std::string reference to std::string_view

* fix: remove unused parameter

* fix: remove redundant access specifier

* fix: use std::array instead of C-style array

* fix: remove redundant access specifier

* fix: replace const std::string reference with std::string_view

* fix: remove redundant access specifier

* fix: use std::array instead of C-style array

* fix: remove redundant access specifier

* fix: replace const std::string reference to std::string_view

* fix: remove redundant access specifier

* fix: merge if statement with enclosing one

* chore: clang-format

* chore: clang-format

* Revert "fix: remove redundant access specifier"

This reverts commit 054e4e7eec.

* Revert "fix: remove redundant access specifier"

This reverts commit 2c92f227e8.

* Revert "fix: remove redundant access specifier"

This reverts commit a0710202a8.

* Revert "fix: remove redundant access specifier"

This reverts commit 54da1d9397.

* Revert "fix: remove redundant access specifier"

This reverts commit f7b1777578.

* Revert "fix: remove redundant access specifier"

This reverts commit ad8e3dfff4.

* chore: revert access specifier change
2022-04-01 14:16:33 -05:00
Charles Kerr 96178b1a9f
feat: add support for adding torrents by raw hash values (#2608)
* Add support for adding torrents by raw hash values

Co-authored-by: vjunk <vjunk@mail.ru>
2022-02-12 22:16:55 -06:00
Charles Kerr df1cca9b57
chore: update copyright years, make notices consistent (#2463) 2022-01-20 12:27:56 -06:00
Charles Kerr 0c16c454ba
refactor: base64 utils (#2381)
base64 encode/decode now take std::string_views and return std::strings
2022-01-08 06:46:25 -06:00
Charles Kerr 0e321c2d21
fix: clang warnings (#2339)
* fix: comparison-is-always-false warning

* fix: C/C++ mixing (memset() to clear a C++ object)
2021-12-25 11:22:12 -06:00
Charles Kerr bd68d3a2fd
refactor: use tr_sha1_digest_t everywhere (#2330) 2021-12-21 16:14:15 -06:00
Charles Kerr 42b1362760
refactor: tidy libtransmission includes (#2316) 2021-12-15 15:25:42 -06:00
Charles Kerr 99aeaa0eaf
refactor: tr_ssha1(), tr_ssha1_matches() (#2148)
* refactor: make tr_ssha1 and tr_ssha1_matches string_view-friendly
2021-11-13 20:03:01 -06: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
Charles Kerr ce51f1adbf
refactor: work around msvc constxpr std::array bug (#1429)
The tests FTBFS on the latest version of MSVC because it has a regression
that crashes the compiler when it sees a constexpr std::array. This commit
can be reverted when MSVC releases a fix.

https://developercommunity.visualstudio.com/content/problem/1139953/167-regression-auto-constexpr-with-deduced-array-i.html
2020-09-07 19:33:36 -05:00
Charles Kerr 9f7c865454
refactor: don't store torrent hashes in QStrings (#1428)
* refactor: keep torrent hash in std::array<char,20>

This replaces the hashString QString allocation with a compile-time
array that's included in sizeof the Torrent struct that owns it.
2020-09-07 16:19:10 -05:00
Berbe 8445e090a7
Fix: Test structure shadowing Google Test suite one (#1417)
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2020-09-07 13:52:05 -05:00
Charles Kerr 677dc73eac
refactor: use GTest for running tests (#1383)
* refactor: use google-test on libtransmission tests
2020-08-11 13:11:55 -05:00