Skip to content

Instantly share code, notes, and snippets.

@uchan-nos
Created August 18, 2014 12:03
Show Gist options
  • Select an option

  • Save uchan-nos/1dd543e01a2fcea7946f to your computer and use it in GitHub Desktop.

Select an option

Save uchan-nos/1dd543e01a2fcea7946f to your computer and use it in GitHub Desktop.
uint32_t Read32(const char* data) {
return static_cast<unsigned char>(data[0])
| (static_cast<unsigned char>(data[1]) << 8u)
| (static_cast<unsigned char>(data[2]) << 16u)
| (static_cast<unsigned char>(data[3]) << 24u);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment