Skip to content

Instantly share code, notes, and snippets.

@ScatteredRay
Last active August 29, 2015 14:14
Show Gist options
  • Save ScatteredRay/ddbff8cdffcdf97d6d00 to your computer and use it in GitHub Desktop.
Save ScatteredRay/ddbff8cdffcdf97d6d00 to your computer and use it in GitHub Desktop.
Code style

Include Guards

#ifndef HEADER_H
#define HEADER_H
//...
#endif //HEADER_H

is preferred to

#pragma once

Due to not having problems with linked files, duplicated files, or complex build setups including unity builds.

Const Modifiers

const void*

is preferred over

void const *

due to being less ambigious, and keeping the * with the type in more circumstances, even though it can make

void* const *

more ambigious, this is acceptable due to it's rarity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment