Charles Kerr
f46c4c4df9
refactor: remove tr_variantGetStr ( #2160 )
2021-11-14 17:28:37 -06:00
Charles Kerr
ba59060737
feat: new function tr_variantGetStrView() ( #2079 )
...
* feat: new method tr_variantGetStrView()
* test: add new variant tests
2021-11-01 16:30:18 -05:00
Charles Kerr
236a0965fa
refactor: tr_variant*Str() functions now take a std::string_view ( #1990 )
...
* refactor tr_variant*Str functions now take a std::string_view
* refactor: tr_torrentPrimaryMimeType returns a string-view
2021-10-19 21:30:50 -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
003685b40a
refactor: use nullptr instead of NULL ( #1884 )
...
* refactor: use nullptr instead of NULL.
No functional changes; just more C++ification
2021-10-06 11:32:17 -05:00
Charles Kerr
cc204e0b2c
refactor: prefer "using" over "typedef" ( #1883 )
...
* refactor: prefer "using" over "typedef"
2021-10-06 09:26:07 -05:00
Charles Kerr
3b49fa993c
refactor: remove unused tr_variant_string.quark ( #1880 )
...
This was assigned but never used. Shrinks sizeof(tr_variant) by 8 bytes.
2021-10-05 14:33:02 -05:00
Charles Kerr
17ee032dd8
refactor: remove TR_BEGIN_DECLS, TR_END_DECLS ( #1837 )
...
* refactor: remove TR_BEGIN_DECLS, TR_END_DECLS
2021-09-25 11:07:22 -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
677dc73eac
refactor: use GTest for running tests ( #1383 )
...
* refactor: use google-test on libtransmission tests
2020-08-11 13:11:55 -05:00
Mike Gelfand
a762c770f2
Make conditional expressions explicitly boolean
2017-04-30 19:26:01 +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
Mike Gelfand
3523277e7f
Ongoing refactoring (use size_t instead of int)
2015-12-25 11:34:35 +00:00
Mike Gelfand
4a4badd4af
Ongoing refactoring (use size_t instead of int)
2015-12-25 10:19:50 +00:00
Mike Gelfand
3b129a72d8
#5908 : Check for tr_loadFile
return value instead of errno
in tr_variantFromFile
...
Seems like there could be a defect in uClibc making errno not
thread-local. Don't rely on errno value but check function return value
instead which is a better failure indicator.
Return errors from `tr_loadFile` and `tr_variantFromFile` via tr_error.
Fix `tr_sessionLoadSettings` to not fail on Windows if settings.json
does not exist.
2015-04-11 10:51:59 +00:00
Mike Gelfand
440f482d01
Replace tabs with spaces; remove trailing spaces
2015-01-02 11:15:31 +00:00
Mike Gelfand
342f38bbc5
Factor RPC logic out from session (Qt client)
2014-12-27 20:03:10 +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
15d11de5f4
add svn:keywords on source files that were missing them
2014-01-19 01:29:38 +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
94b5e88d36
(trunk, libT) more tr_variant revision: faster serialization, dictionaries use less space
2012-12-24 22:38:41 +00:00
Mitchell Livingston
3976366306
change the #include of quark.h in variant.h
2012-12-23 03:18:39 +00:00
Jordan Lee
c1559f3cc4
(trunk, libT) first drop of the tr_quark patch.
2012-12-22 20:35:19 +00:00
Jordan Lee
df5b6365bd
(trunk, libT) faster JSON parsing for tr_variant. This mostly helps the Qt client, which makes heavy use of the JSON-based RPC calls.
2012-12-15 00:01:59 +00:00
Jordan Lee
e96ed247fe
refactor libtransmission's tr_benc class as tr_variant.
2012-12-14 04:34:42 +00:00