[libc-commits] [PATCH] D130405: Implement TZ Variable Parsing Function.
Thorsten via Phabricator via libc-commits
libc-commits at lists.llvm.org
Sat Jul 30 23:33:43 PDT 2022
tschuett added inline comments.
================
Comment at: libc/src/time/time_zone_posix.cpp:68
+cpp::Optional<int32_t> PosixTimeZone::ParseOffset(int min_hour, int max_hour,
+ int sign) {
+ if (m_spec.size() == 0)
----------------
jeffbailey wrote:
> I keep wondering if this should be bool instead of int. I think it's always plus one or negative one, never zero or another value.
Boolean parameters can be confusing. I would instead wrap the boolean into a class.
```
class Sign {
};
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130405/new/
https://reviews.llvm.org/D130405
More information about the libc-commits
mailing list