| 53 | } |
| 54 | |
| 55 | void internalFromString( const std::string &repr, uint64_t &h1, uint64_t &h2 ) |
| 56 | { |
| 57 | if( repr.length() != static_cast<std::string::size_type>( 32 ) ) |
| 58 | { |
| 59 | throw Exception( |
| 60 | boost::str( |
| 61 | boost::format( |
| 62 | "Invalid IECore::MurmurHash string representation \"%s\", must have 32 characters" ) |
| 63 | % repr |
| 64 | ) ); |
| 65 | } |
| 66 | |
| 67 | std::stringstream s; |
| 68 | s.str( repr.substr( 0, 16 ) ); |
| 69 | s >> std::hex >> h1; |
| 70 | s.clear(); |
| 71 | s.str( repr.substr( 16, 16 ) ); |
| 72 | s >> std::hex >> h2; |
| 73 | } |
| 74 | |
| 75 | } // namespace |
| 76 |
no test coverage detected