# HG changeset patch # User František Kučera # Date 1514056404 -3600 # Node ID 17785b69430d9da2d421d54e04b995366bc3513b # Parent 4975c24cc361c3f0e3103ac1618f3d1fa2dd0376 move typedefs to a header file diff -r 4975c24cc361 -r 17785b69430d c++/rgb-assembler/nbproject/configurations.xml --- a/c++/rgb-assembler/nbproject/configurations.xml Sat Dec 23 17:52:32 2017 +0100 +++ b/c++/rgb-assembler/nbproject/configurations.xml Sat Dec 23 20:13:24 2017 +0100 @@ -4,6 +4,7 @@ + types.h + + @@ -66,6 +69,8 @@ + + diff -r 4975c24cc361 -r 17785b69430d c++/rgb-assembler/nbproject/project.xml --- a/c++/rgb-assembler/nbproject/project.xml Sat Dec 23 17:52:32 2017 +0100 +++ b/c++/rgb-assembler/nbproject/project.xml Sat Dec 23 20:13:24 2017 +0100 @@ -6,7 +6,7 @@ rgb-assembler cpp - + h UTF-8 diff -r 4975c24cc361 -r 17785b69430d c++/rgb-assembler/rgb-assembler.cpp --- a/c++/rgb-assembler/rgb-assembler.cpp Sat Dec 23 17:52:32 2017 +0100 +++ b/c++/rgb-assembler/rgb-assembler.cpp Sat Dec 23 20:13:24 2017 +0100 @@ -7,15 +7,10 @@ #include #include +#include "types.h" + using namespace std; -typedef uint16_t address_t; -typedef uint8_t octet_t; -typedef uint8_t command_t; -typedef uint8_t sleep_t; -typedef uint8_t color_t; -typedef uint8_t led_t; - // TODO: strong typedefs http://www.boost.org/doc/libs/1_61_0/libs/serialization/doc/strong_typedef.html ? const address_t MEMORY_SIZE = 1024; diff -r 4975c24cc361 -r 17785b69430d c++/rgb-assembler/types.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/c++/rgb-assembler/types.h Sat Dec 23 20:13:24 2017 +0100 @@ -0,0 +1,10 @@ +#pragma once + +#include + +typedef uint16_t address_t; +typedef uint8_t octet_t; +typedef uint8_t command_t; +typedef uint8_t sleep_t; +typedef uint8_t color_t; +typedef uint8_t led_t;