summaryrefslogtreecommitdiff
path: root/src/buffer.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-07-27 00:34:20 +0100
committerMaxime Coste <frrrwww@gmail.com>2016-07-27 00:34:20 +0100
commit17d2dc9477444786b3db8ea834a45abbcb88abfd (patch)
treee2a793b19b7309c7d9247b48786f0516f8a5611b /src/buffer.hh
parentf30bd4c5401bb0be603ad7f99a05bb139740b2f3 (diff)
Try to disambiguate timespec as a struct
Diffstat (limited to 'src/buffer.hh')
-rw-r--r--src/buffer.hh12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/buffer.hh b/src/buffer.hh
index 7b04aa9d..ea8997d4 100644
--- a/src/buffer.hh
+++ b/src/buffer.hh
@@ -45,7 +45,7 @@ constexpr Array<EnumDesc<ByteOrderMark>, 2> enum_desc(ByteOrderMark)
class Buffer;
-constexpr timespec InvalidTime = { -1, -1 };
+constexpr struct timespec InvalidTime = { -1, -1 };
// A BufferIterator permits to iterate over the characters of a buffer
class BufferIterator
@@ -114,7 +114,7 @@ public:
};
Buffer(String name, Flags flags, StringView data = {},
- timespec fs_timestamp = InvalidTime);
+ struct timespec fs_timestamp = InvalidTime);
Buffer(const Buffer&) = delete;
Buffer& operator= (const Buffer&) = delete;
~Buffer();
@@ -130,8 +130,8 @@ public:
ByteCoord replace(ByteCoord begin, ByteCoord end, StringView content);
size_t timestamp() const;
- timespec fs_timestamp() const;
- void set_fs_timestamp(timespec ts);
+ struct timespec fs_timestamp() const;
+ void set_fs_timestamp(struct timespec ts);
void commit_undo_group();
bool undo(size_t count = 1) noexcept;
@@ -191,7 +191,7 @@ public:
void run_hook_in_own_context(StringView hook_name, StringView param);
- void reload(StringView data, timespec fs_timestamp = InvalidTime);
+ void reload(StringView data, struct timespec fs_timestamp = InvalidTime);
void check_invariant() const;
@@ -271,7 +271,7 @@ private:
Vector<Change, MemoryDomain::BufferMeta> m_changes;
- timespec m_fs_timestamp;
+ struct timespec m_fs_timestamp;
// Values are just data holding by the buffer, they are not part of its
// observable state