Commit Graph

123 Commits

Author SHA1 Message Date
Tomas Babej
0bc92d6115 meta: Adjust copyright headers 2021-09-05 12:02:07 -04:00
Tomas Babej
8b86f16f25 Variant: Do not use implicit fall-through
The code handling the comparison between the date and string types would
convert the variants to correct types, but only through multi-level
fall-through in the switch statement, which is always a bit of a
dangerous construct.

Added explicit return for the non-trivial case, preventing the need for
the fall-through.

Closes #2502.
2021-06-12 15:49:06 -04:00
Rosen Penev
3cafb5257e clang-tidy: use = default
Found with modernize-use-equals-default

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-04-23 00:15:06 -04:00
Tomas Babej
5e0fc1caab Variant: Ensure implmentation of addition/subtraction of dates/durations does not involve casting
Implicit casting of a duration anchors it around the 'now' point in
time, which would throw off the conversion.
2021-01-18 02:59:11 -05:00
Tomas Babej
7242accb58 Variant: Convert durations into dates as implicitly anchored around now
The _period attribute holds the number of seconds that the Duration
holds, while _date attribute holds the number of seconds since the
beginning of unix epoch (also known as epoch time). As such, it does not
make sense to convert _period directly into _date.

Interpret _period as offset relative to current unix epoch time.

Closes #2390.
2021-01-18 02:59:11 -05:00
Tomas Babej
9017cd6e53 doc: Update copyright to 2021 2021-01-02 02:48:22 -05:00
Tomas Babej
a641e4315f Variant: Support 64-bit numeric values
Closes #2101.
2021-01-01 23:57:34 -05:00
Paul Beckingham
3e0a428185 Revert "[clang-tidy] Use .empty instead of comparing size"
This reverts commit a331cceded.
2020-12-05 16:18:37 -05:00
Paul Beckingham
ead50d4d6e Revert "[clang-tidy] Use default to initialize constructors"
This reverts commit bf40ea8816.
2020-12-05 16:18:37 -05:00
Paul Beckingham
504aacd244 Revert "[clang-tidy] Pass by value with std::move"
This reverts commit e46039efb1.
2020-12-05 16:18:37 -05:00
Paul Beckingham
5502729131 Revert "[clang-tidy] Switch C headers to C++ ones"
This reverts commit 0344856d65.
2020-12-05 16:18:37 -05:00
Paul Beckingham
0b828be4aa Revert "[clang-tidy] Remove redundant init"
This reverts commit cc6826fc3a.
2020-12-05 16:18:37 -05:00
Paul Beckingham
9016c26828 Revert "[cl;ang-tidy] Don't initialize strings"
This reverts commit 426e067f43.
2020-12-05 16:18:37 -05:00
Paul Beckingham
c43a513158 Revert "[clang-tidy] Replace C style casts with C++ ones"
This reverts commit 13e1bf7204.
2020-12-05 16:18:37 -05:00
Paul Beckingham
364b4ea8bd Revert "[clang-tidy] Simplify boolean expressions"
This reverts commit 51870dff34.
2020-12-05 16:18:37 -05:00
Rosen Penev
51870dff34 [clang-tidy] Simplify boolean expressions
Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
13e1bf7204 [clang-tidy] Replace C style casts with C++ ones
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
426e067f43 [cl;ang-tidy] Don't initialize strings
Found with readability-redundant-string-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
cc6826fc3a [clang-tidy] Remove redundant init
Found with modernize-use-default-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
0344856d65 [clang-tidy] Switch C headers to C++ ones
Found using modernize-return-braced-init-list

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
e46039efb1 [clang-tidy] Pass by value with std::move
Found with modernize-pass-by-value

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
bf40ea8816 [clang-tidy] Use default to initialize constructors
Found with modernize-use-equals-default

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
a331cceded [clang-tidy] Use .empty instead of comparing size
Found with readability-container-size-empty

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Tomas Babej
a09f9d48ab Update copyright to 2020 2020-11-21 12:27:05 -05:00
Paul Beckingham
660b7c09af Merge pull request #2095 from tbabej/test_fixes
TW-1511: Interpret string subtraction as concanetation with a dash
2019-01-02 08:02:12 -05:00
Tomas Babej
bf2cd0f5e4 TW-1511: Interpret string subtraction as concanetation with a dash
Fixes #1537 (previously known as TW-1511).
2019-01-01 21:56:06 -05:00
Tomas Babej
8066e4e6e2 meta: Update copyright year 2019-01-01 08:46:21 -05:00
Kirill Bobyrev
5cdbe6d019 Use nullptr instead lf C-styled NULL 2018-03-07 22:21:28 +03:00
Simon Ruderich
e817dfc800 Always use https:// link for opensource.org
It was already used in a few places, make this consistent.
2018-03-04 14:53:07 +01:00
Paul Beckingham
0de169bb10 Copyright 2018 2017-12-31 19:22:07 -05:00
Tomas Babej
3245d00edb TW-1910: Remove unreachable statement
- Thanks to Martin Strunz.
2017-05-08 17:20:42 +02:00
Paul Beckingham
434e95f560 Variant: Migraded from ISO8601d to Datetime 2017-03-04 21:44:07 -05:00
Paul Beckingham
2cca52bc4c Variant: Reduced dependence on ISO8601 2017-02-27 08:28:45 -05:00
Paul Beckingham
8faadd8199 Variant: Removed uneeded header 2017-01-25 16:54:39 -05:00
Paul Beckingham
7f5d44a675 Variant: Relocate strings 2017-01-25 16:10:57 -05:00
Paul Beckingham
4e7576cb79 Merge branch 'recurrence' into 2.6.0 2017-01-07 12:29:11 -05:00
Paul Beckingham
a50e65a134 Copyright update 2017-01-01 12:30:04 -05:00
Paul Beckingham
5193f7d03e Task: Improved method signature 2016-12-31 15:55:06 -05:00
Paul Beckingham
d9a3be9993 Variant: Converted from ISO8601p to Duration 2016-12-11 21:03:15 -05:00
Paul Beckingham
355620c640 libhsared: migrating from local to libshared 2016-12-06 07:20:45 -05:00
Paul Beckingham
2d20f4d57b Cleanup: Converted all sprintf to snprintf 2016-02-25 00:19:38 -05:00
Paul Beckingham
96f04ffc25 Variant: C++11 2016-02-03 20:22:30 -05:00
Paul Beckingham
da96962b00 Variant: Removed obsolete method 2016-01-09 22:26:58 -05:00
Paul Beckingham
641d232dea Copyright: Updated to 2016 2015-12-31 15:06:43 -05:00
Paul Beckingham
a2bd6d8342 Revert "Variant: Converted from sprintf to std::to_string"
This reverts commit f339672b89.
2015-11-02 18:46:36 -05:00
Paul Beckingham
b4b41215a2 Revert "C++11: Migrated from strtod to std::stod"
This reverts commit db49efd72f.
2015-11-02 18:44:29 -05:00
Paul Beckingham
ef3e072436 Revert "Variant: Converted from strtol/substr to std::stoi/std::compare"
This reverts commit 6df55c9156.
2015-11-02 18:41:44 -05:00
Paul Beckingham
6df55c9156 Variant: Converted from strtol/substr to std::stoi/std::compare 2015-11-01 21:33:07 -05:00
Paul Beckingham
db49efd72f C++11: Migrated from strtod to std::stod 2015-11-01 19:44:15 -05:00
Paul Beckingham
f339672b89 Variant: Converted from sprintf to std::to_string 2015-11-01 18:36:37 -05:00