commit | c4bd0ac9a60f01e9e22884410fcf269d3b41b5ad | [log] [tgz] |
---|---|---|
author | Olli Etuaho <oetuaho@nvidia.com> | Thu Feb 22 16:29:32 2018 +0200 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Feb 26 15:05:44 2018 +0000 |
tree | 7fc35308b45df0cfb943b7544b29e78cab17bfed | |
parent | 2f7c04a3c5d7b392028ae4673dabd1085673f8e4 [diff] [blame] |
Add 32-bit hash helper to ImmutableString Since the length of the hash is known prior to compilation, it can be compared with script-generated hashes. BUG=angleproject:2267 TEST=angle_unittests Change-Id: Ia0a78dfd450c4ea2d526da7f3495b9750dcbd1af Reviewed-on: https://chromium-review.googlesource.com/931884 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/ImmutableString.h b/src/compiler/translator/ImmutableString.h index e077377..301e91c 100644 --- a/src/compiler/translator/ImmutableString.h +++ b/src/compiler/translator/ImmutableString.h
@@ -128,6 +128,8 @@ } }; + uint32_t hash32() const; + private: const char *mData; size_t mLength;