13 Commits

Author SHA1 Message Date
Sadie Powell
cefae0ed22 Fix MSVC compatibility issues. 2021-06-07 10:40:18 +01:00
Sadie Powell
b42fa13259 Fix the to_string implementation of ConvToStr.
I have no idea how I didn't notice this bug when it was originally
written.
2021-05-10 14:15:01 +01:00
Sadie Powell
e414f10a6a Clean up the ConvTo functions.
- Add a default parameter to ConvToNum.
- Use std::to_string for types that implement it.
- Document the functions properly.
2021-04-15 15:35:57 +01:00
Sadie Powell
7d84e4900f Fix a ton of pedantic compiler warnings. 2021-04-04 23:42:15 +01:00
InspIRCd Robot
7b1ab06a95 Update copyright headers. 2021-03-05 02:16:11 +00:00
InspIRCd Robot
44489ddf7e Update copyright headers. 2020-04-24 10:23:47 +01:00
Matt Schatz
998b407b2a Fix the signed-ness within ConvToNum char overloads.
It should be signed int with signed char and vice-versa.
Currently, anything over 127 as unsigned char would return 0.
2020-03-24 18:26:59 +00:00
InspIRCd Robot
aa692dc103 Update copyright headers. 2020-01-11 22:14:43 +00:00
Peter Powell
874ce50b8d Add overloads for ConvToNum to prevent (unsigned) char weirdness. 2019-01-28 11:08:19 +00:00
Peter Powell
0f7cfd46ef Fix conversion issues by replacing ConvToInt with ConvToNum<T>.
The former was a thin wrapper around atol and brought with it all
of the weird parsing logic of atol which is almost never what is
actually wanted. It also almost never returned the numeric type
which is actually wanted which can cause weird issues when casting.
2018-12-12 21:43:24 +00:00
Peter Powell
36040be295 Fix a ton of -Wsign-conversion warnings. 2017-11-17 15:33:01 +00:00
Attila Molnar
810ddfb91a Add no-op ConvToStr(const std::string&) 2016-02-25 15:18:39 +01:00
Attila Molnar
8f5a3bb7bc Move implementation of ConvTo*() and related functions into convto.h 2016-02-25 15:15:00 +01:00