Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix C4307 warning #198

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions include/ignition/common/Util.hh
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,6 @@ namespace ignition
std::string IGNITION_COMMON_VISIBLE sha1(
void const *_buffer, std::size_t _byteCount);

#ifdef _MSC_VER
// Disable warning C4307
#pragma warning(push)
#pragma warning(disable:4307)
#endif

/// \brief fnv1a algorithm for 64-bit platforms.
/// \param[in] _key The input string.
/// \return A 64-bit unsigned hash value.
Expand All @@ -204,18 +198,14 @@ namespace ignition

for (auto i = 0u; i < len; ++i)
{
uint8_t value = data[i];
uint8_t value = static_cast<uint8_t>(data[i]);
hash = hash ^ value;
hash *= prime;
}

return hash;
}

#ifdef _MSC_VER
#pragma warning(pop)
#endif

/// \brief Find the environment variable '_name' and return its value.
///
/// \TODO(mjcarroll): Deprecate and remove in tick-tock.
Expand Down