oxen-core/src/common
Jason Rhinelander f09857de2b More string_view (mostly in wallet code)
This started out with a few string_view simplifications, but unwinding
the string_view calls resulted in quite a few changes.

- use constexpr string_view instead of macros for constants

- use constexpr ints for other macros instead of constants (to be
consistent with the string_view constexprs); also eliminated a couple of
unused variables.

- convert amount parsing to string_view, and rewrite it with comments to
be far less confusing.  (Previously it was remove a "." from a string,
chopping 0s off the end then putting them back on which was hard to
follow).

- fixed some not-quite-right amount parsing unit tests

- replace a bunch of string code (including lots of code allocating new
strings with .substr on a string) with std::string_view.

- avoid using C functions for strings

- convert epee http uri conversion methods to string_view (and fix one
typoed func name "conver" -> "convert")

- Add a `tools::hex_to_type` that converts hex directly into a (simple)
type, with hex and length verification for the type, and use it to
eliminate a bunch of intermediate std::string conversions.

- Convert a bunch of error-prone raw pointer string appends into
more type-safe `tools::view_guts(val)` calls.  (In particular view_guts
always gets the sizeof() correct, while the individual call could easily
put the wrong type in the `sizeof()`).
2020-07-02 12:55:28 -03:00
..
compat Support docker for gitian builds 2019-02-14 23:14:34 +01:00
aligned.c Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
aligned.h Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
apply_permutation.h Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
base58.cpp Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
base58.h Replace boost::string_ref with std::string_view 2020-07-02 12:52:12 -03:00
boost_serialization_helper.h Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
CMakeLists.txt Split up common/util.h 2020-07-02 12:52:12 -03:00
combinator.cpp Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
combinator.h Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
command_line.cpp Split up common/util.h 2020-07-02 12:52:12 -03:00
command_line.h Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
common_fwd.h Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
dns_utils.cpp More string_view niceties 2020-07-02 12:52:13 -03:00
dns_utils.h Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
download.cpp Replace (most) boost::thread with std::thread 2020-07-02 12:52:13 -03:00
download.h Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
error.cpp Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
error.h Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
expect.cpp Adding expect<T> - a value-or-error implementation 2018-09-12 22:44:34 +00:00
expect.h Misc. C++ modernization 2020-07-02 12:52:12 -03:00
file.cpp Miscellaneous fixes 2020-07-02 12:52:13 -03:00
file.h Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
hex.h More string_view (mostly in wallet code) 2020-07-02 12:55:28 -03:00
http_connection.h Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
i18n.cpp More string_view niceties 2020-07-02 12:52:13 -03:00
i18n.h Rewrite translation file generation using cmake 2020-06-15 12:49:33 -03:00
json_util.h Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
lock.h C++17 2020-07-02 12:52:12 -03:00
loki.cpp Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
loki.h Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
loki_integration_test_hooks.h Rewrite the integration tests to use pipes (#1045) 2020-02-21 14:48:25 +11:00
meta.h Miscellaneous fixes 2020-07-02 12:52:13 -03:00
notify.cpp Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
notify.h Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
password.cpp Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
password.h Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
perf_timer.cpp Remove broken timing "optimization" 2019-12-05 21:35:10 -04:00
perf_timer.h Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
periodic_task.h Merge commit 'dcff02e4c3b1214143b19685361c3c6cffa62be7' into MergeUpstream3 2020-05-26 15:15:25 +10:00
pruning.cpp Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
pruning.h Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
random.cpp Move randomness into new common/random.h 2019-11-27 14:07:52 -04:00
random.h Move randomness into new common/random.h 2019-11-27 14:07:52 -04:00
rpc_client.h boost::optional -> std::optional 2020-07-02 12:52:12 -03:00
rules.cpp Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
rules.h Per output unlock time rebased (#114) 2018-08-03 11:39:28 +10:00
scoped_message_writer.cpp Make suspend_readline a (usable) no-op when readline not available 2020-05-20 00:48:59 -03:00
scoped_message_writer.h Make suspend_readline a (usable) no-op when readline not available 2020-05-20 00:48:59 -03:00
sfinae_helpers.h Simplified sfinae_helpers 2020-07-02 12:52:12 -03:00
sha256sum.cpp Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
sha256sum.h Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
signal_handler.h Split up common/util.h 2020-07-02 12:52:12 -03:00
spawn.cpp Split up common/util.h 2020-07-02 12:52:12 -03:00
spawn.h Split up common/util.h 2020-07-02 12:52:12 -03:00
stack_trace.cpp Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
stack_trace.h Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
string_util.cpp More string_view niceties 2020-07-02 12:52:13 -03:00
string_util.h More string_view niceties 2020-07-02 12:52:13 -03:00
threadpool.cpp Post-merge: locks/mutexes 2020-07-02 12:52:13 -03:00
threadpool.h Replace (most) boost::thread with std::thread 2020-07-02 12:52:13 -03:00
timings.cc More string_view niceties 2020-07-02 12:52:13 -03:00
timings.h Miscellaneous header updates via iwyu 2020-07-02 12:52:13 -03:00
unordered_containers_boost_serialization.h Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
updates.cpp More string_view niceties 2020-07-02 12:52:13 -03:00
updates.h Update monero copyright to 2019 pre-emptively to make merge simpler 2019-04-12 14:36:43 +10:00
util.cpp More string_view niceties 2020-07-02 12:52:13 -03:00
util.h More string_view niceties 2020-07-02 12:52:13 -03:00
varint.h Overhaul binary serialization code (part 1) 2020-07-02 12:52:12 -03:00