aboutsummaryrefslogtreecommitdiff
path: root/lib/libdevdctl
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2017-10-26 15:28:18 +0000
committerAlan Somers <asomers@FreeBSD.org>2017-10-26 15:28:18 +0000
commit12a88a3d637e7e7a3726e8dedbcf82cb96cea529 (patch)
tree60d86f54828d5cac293e9367b68fcd7eb77806cf /lib/libdevdctl
parent79b67c8d4a6c421a42edfd087b3ee84856e7e118 (diff)
Notes
Diffstat (limited to 'lib/libdevdctl')
-rw-r--r--lib/libdevdctl/guid.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/libdevdctl/guid.h b/lib/libdevdctl/guid.h
index ede414bec6492..e40d3f983aab7 100644
--- a/lib/libdevdctl/guid.h
+++ b/lib/libdevdctl/guid.h
@@ -62,9 +62,9 @@ class Guid
{
public:
/* Constructors */
- Guid();
Guid(uint64_t guid);
Guid(const std::string &guid);
+ static Guid InvalidGuid();
/* Assignment */
Guid& operator=(const Guid& rhs);
@@ -80,23 +80,24 @@ public:
operator uint64_t() const;
operator bool() const;
- static const uint64_t INVALID_GUID = 0;
protected:
+ static const uint64_t INVALID_GUID = 0;
+
/* The integer value of the GUID. */
uint64_t m_GUID;
};
//- Guid Inline Public Methods ------------------------------------------------
inline
-Guid::Guid()
- : m_GUID(INVALID_GUID)
+Guid::Guid(uint64_t guid)
+ : m_GUID(guid)
{
}
-inline
-Guid::Guid(uint64_t guid)
- : m_GUID(guid)
+inline Guid
+Guid::InvalidGuid()
{
+ return (Guid(INVALID_GUID));
}
inline Guid&