File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -835,6 +835,13 @@ class OIIO_UTIL_API ustringhash {
835
835
#endif
836
836
}
837
837
838
+ // / Construct from a raw hash value. Beware: results are undefined if it's
839
+ // / not the valid hash of a ustring.
840
+ OIIO_HOSTDEVICE explicit constexpr ustringhash (size_t hash) noexcept
841
+ : m_hash(hash)
842
+ {
843
+ }
844
+
838
845
// / Conversion to an OIIO::string_view.
839
846
operator string_view () const noexcept { return ustring::from_hash (m_hash); }
840
847
@@ -963,7 +970,7 @@ class OIIO_UTIL_API ustringhash {
963
970
#endif
964
971
965
972
// / Return the ustringhash corresponding to the given hash. Caveat emptor:
966
- // / results are undefined if it's not the valud hash of a ustring.
973
+ // / results are undefined if it's not the hash value of a ustring.
967
974
OIIO_NODISCARD static constexpr ustringhash from_hash (size_t hash)
968
975
{
969
976
ustringhash u;
@@ -975,13 +982,6 @@ class OIIO_UTIL_API ustringhash {
975
982
// Individual ustringhash internal representation -- the hash value.
976
983
rep_t m_hash;
977
984
978
- // Construct from a raw hash value. It's protected so that it's only
979
- // callable by its friend, ustring.
980
- OIIO_HOSTDEVICE ustringhash (size_t hashval)
981
- : m_hash(hashval)
982
- {
983
- }
984
-
985
985
friend class ustring ;
986
986
};
987
987
You can’t perform that action at this time.
0 commit comments