Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
git init | |
git remote add bootstrap git@github.com:andresfelipemendez/cppbootstrap.git | |
git fetch | |
git pull bootstrap master | |
curl -sL https://github.com/catchorg/Catch2/releases/download/v2.7.1/catch.hpp > catch.hpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Game.h" | |
#include <SDL.h> | |
const float paddleH = 100.0f; | |
Game::Game() | |
:mWindow(nullptr) | |
,mRenderer(nullptr) | |
,mIsRunning(true) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <assert.h> | |
#include <math.h> | |
#include <sys/time.h> | |
#include "bcm_host.h" | |
#include <EGL/egl.h> | |
#include <EGL/eglext.h> | |
#include <GLES2/gl2.h> | |
#define TRUE 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# allow powershell to execute commands Set-ExecutionPolicy -Scope CurrentUser | |
# set permission RemoteSigned | |
# reload profile to acces new changes . $profile | |
function openCurrentFolder{ | |
ii . | |
} | |
New-Alias open openCurrentFolder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SDL.h> | |
#undef main | |
#include <iostream> | |
class LTimer | |
{ | |
public: | |
//Initializes variables | |
LTimer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;^ ctrl | |
;! alt | |
;+ shift | |
^!r::Reload | |
^F1::Send, {Media_Play_Pause} | |
^F2::Send, {Media_Prev} | |
^F3::Send, {Media_Next} | |
^F5::Send, {Volume_Up} | |
^F4::Send, {Volume_Down} | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.11) | |
find_package(Boost 1.66 REQUIRED COMPONENTS system) | |
if(Boost_FOUND) | |
include_directories(${Boost_INCLUDE_DIRS}) | |
link_directories(${Boost_LIBRARY_DIR}) | |
add_executable(progname main.cpp) | |
target_link_libraries(progname ${Boost_LIBRARIES}) | |
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <array> | |
#include <memory> | |
#include <iostream> | |
using namespace std; | |
#include <intrin.h> | |
string get_cpu_name() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
mkdir ..\..\build | |
pushd ..\..\build | |
cl -Zi ..\handmade\code\win32_handmade.cpp user32.lib | |
popd |
NewerOlder