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