summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2017-10-22 12:34:30 +1100
committer Vas Crabb <vas@vastheman.com>2017-10-22 12:34:30 +1100
commit4c29419cab5f44db1d52e5f28cef42450406be2a (patch)
tree33939159a0d389f16e0e8f58a1acc86f7d44f263 /src/lib
parentb39e7a994136b459905388496a94beff2f3810bd (diff)
srcclean (nw)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/formats/acorn_dsk.cpp2
-rw-r--r--src/lib/util/timeconv.h30
2 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/formats/acorn_dsk.cpp b/src/lib/formats/acorn_dsk.cpp
index 59fb07d0a27..55629e2c3c8 100644
--- a/src/lib/formats/acorn_dsk.cpp
+++ b/src/lib/formats/acorn_dsk.cpp
@@ -522,7 +522,7 @@ int acorn_dos_format::identify(io_generic *io, uint32_t form_factor)
int type = find_size(io, form_factor);
if(type != -1)
- return 90;
+ return 90;
return 0;
}
diff --git a/src/lib/util/timeconv.h b/src/lib/util/timeconv.h
index 80ef6f6b73f..365af8c19fb 100644
--- a/src/lib/util/timeconv.h
+++ b/src/lib/util/timeconv.h
@@ -36,17 +36,17 @@ typedef std::chrono::duration<std::uint64_t, std::ratio<1, 10000000> > ntfs_dura
//---------------------------------------------------------
-// arbitrary_datetime
+// arbitrary_datetime
//---------------------------------------------------------
struct arbitrary_datetime
{
- int year; // absolute year (1900 AD = 1900)
- int month; // month (1-12)
- int day_of_month; // day of month (1-31)
- int hour; // hour (0-23)
- int minute; // minute (0-59)
- int second; // second (0-59)
+ int year; // absolute year (1900 AD = 1900)
+ int month; // month (1-12)
+ int day_of_month; // day of month (1-31)
+ int hour; // hour (0-23)
+ int minute; // minute (0-59)
+ int second; // second (0-59)
};
@@ -71,7 +71,7 @@ public:
static constexpr int base_second = S;
//---------------------------------------------------------
- // from_arbitrary_datetime - converts an
+ // from_arbitrary_datetime - converts an
// from_arbitrary_datetime to this arbitrary_clock's scale
//---------------------------------------------------------
@@ -173,7 +173,7 @@ private:
//---------------------------------------------------------
- // clamp_or_throw
+ // clamp_or_throw
//---------------------------------------------------------
static int clamp_or_throw(int value, int minimum, int maximum, bool clamp, const char *out_of_range_message)
@@ -189,18 +189,18 @@ private:
}
//---------------------------------------------------------
- // duration_from_arbitrary_datetime - converts an
+ // duration_from_arbitrary_datetime - converts an
// arbitrary_datetime to this arbitrary_clock's duration
//---------------------------------------------------------
static duration duration_from_arbitrary_datetime(const arbitrary_datetime &dt, bool clamp)
{
// range checking
- const int month = clamp_or_throw(dt.month, 1, 12, clamp, "invalid dt.month");
- const int day_of_month = clamp_or_throw(dt.day_of_month, 1, gregorian_days_in_month(month, dt.year), clamp, "invalid dt.day_of_month");
- const int hour = clamp_or_throw(dt.hour, 0, 23, clamp, "invalid dt.hour");
- const int minute = clamp_or_throw(dt.minute, 0, 59, clamp, "invalid dt.minute");
- const int second = clamp_or_throw(dt.second, 0, 59, clamp, "invalid dt.second");
+ const int month = clamp_or_throw(dt.month, 1, 12, clamp, "invalid dt.month");
+ const int day_of_month = clamp_or_throw(dt.day_of_month, 1, gregorian_days_in_month(month, dt.year), clamp, "invalid dt.day_of_month");
+ const int hour = clamp_or_throw(dt.hour, 0, 23, clamp, "invalid dt.hour");
+ const int minute = clamp_or_throw(dt.minute, 0, 59, clamp, "invalid dt.minute");
+ const int second = clamp_or_throw(dt.second, 0, 59, clamp, "invalid dt.second");
const int64_t our_absolute_day = absolute_day(Y, M, D);
const int64_t their_absolute_day = absolute_day(dt.year, month, day_of_month);