diff options
-rw-r--r-- | raul/Array.hpp | 5 | ||||
-rw-r--r-- | raul/Exception.hpp | 1 | ||||
-rw-r--r-- | raul/Maid.hpp | 6 | ||||
-rw-r--r-- | raul/Path.hpp | 6 | ||||
-rw-r--r-- | raul/Process.hpp | 4 | ||||
-rw-r--r-- | raul/RingBuffer.hpp | 13 | ||||
-rw-r--r-- | raul/Semaphore.hpp | 10 | ||||
-rw-r--r-- | raul/Socket.hpp | 14 | ||||
-rw-r--r-- | raul/Symbol.hpp | 4 | ||||
-rw-r--r-- | raul/TimeSlice.hpp | 6 | ||||
-rw-r--r-- | raul/TimeStamp.hpp | 5 | ||||
-rw-r--r-- | test/array_test.cpp | 4 | ||||
-rw-r--r-- | test/maid_test.cpp | 7 | ||||
-rw-r--r-- | test/path_test.cpp | 6 | ||||
-rw-r--r-- | test/ringbuffer_test.cpp | 8 | ||||
-rw-r--r-- | test/sem_test.cpp | 6 | ||||
-rw-r--r-- | test/socket_test.cpp | 17 | ||||
-rw-r--r-- | test/symbol_test.cpp | 6 | ||||
-rw-r--r-- | test/thread_test.cpp | 4 | ||||
-rw-r--r-- | test/time_test.cpp | 2 |
20 files changed, 73 insertions, 61 deletions
diff --git a/raul/Array.hpp b/raul/Array.hpp index 1920b4a..5f1d4e6 100644 --- a/raul/Array.hpp +++ b/raul/Array.hpp @@ -17,11 +17,12 @@ #ifndef RAUL_ARRAY_HPP #define RAUL_ARRAY_HPP +#include "raul/Maid.hpp" + #include <algorithm> #include <cassert> #include <cstddef> - -#include "raul/Maid.hpp" +#include <memory> namespace Raul { diff --git a/raul/Exception.hpp b/raul/Exception.hpp index 78e9f08..a1c5dfd 100644 --- a/raul/Exception.hpp +++ b/raul/Exception.hpp @@ -16,6 +16,7 @@ #include <exception> #include <string> +#include <utility> #ifndef RAUL_EXCEPTION_HPP #define RAUL_EXCEPTION_HPP diff --git a/raul/Maid.hpp b/raul/Maid.hpp index 73cb82a..26845b6 100644 --- a/raul/Maid.hpp +++ b/raul/Maid.hpp @@ -17,12 +17,12 @@ #ifndef RAUL_MAID_HPP #define RAUL_MAID_HPP -#include <atomic> -#include <memory> - #include "raul/Deletable.hpp" #include "raul/Noncopyable.hpp" +#include <atomic> +#include <memory> + namespace Raul { /** Explicit garbage-collector. diff --git a/raul/Path.hpp b/raul/Path.hpp index 2d0c9c7..d5116d2 100644 --- a/raul/Path.hpp +++ b/raul/Path.hpp @@ -17,12 +17,12 @@ #ifndef RAUL_PATH_HPP #define RAUL_PATH_HPP -#include <algorithm> -#include <string> - #include "raul/Exception.hpp" #include "raul/Symbol.hpp" +#include <algorithm> +#include <string> + namespace Raul { /** A restricted path of Symbols separated by, and beginning with, "/". diff --git a/raul/Process.hpp b/raul/Process.hpp index 61fb501..0b3a819 100644 --- a/raul/Process.hpp +++ b/raul/Process.hpp @@ -17,14 +17,14 @@ #ifndef RAUL_PROCESS_HPP #define RAUL_PROCESS_HPP +#include "raul/Noncopyable.hpp" + #include <sys/resource.h> #include <sys/time.h> #include <unistd.h> #include <string> -#include "raul/Noncopyable.hpp" - namespace Raul { /** A child process. diff --git a/raul/RingBuffer.hpp b/raul/RingBuffer.hpp index 1ec5e4e..d92c16b 100644 --- a/raul/RingBuffer.hpp +++ b/raul/RingBuffer.hpp @@ -17,14 +17,15 @@ #ifndef RAUL_RING_BUFFER_HPP #define RAUL_RING_BUFFER_HPP -#include <assert.h> -#include <atomic> -#include <stdint.h> -#include <stdlib.h> -#include <string.h> - #include "raul/Noncopyable.hpp" +#include <atomic> +#include <cassert> +#include <cstdint> +#include <cstdlib> +#include <cstring> +#include <memory> + namespace Raul { /** diff --git a/raul/Semaphore.hpp b/raul/Semaphore.hpp index ee79ba7..e0fbf18 100644 --- a/raul/Semaphore.hpp +++ b/raul/Semaphore.hpp @@ -17,19 +17,19 @@ #ifndef RAUL_SEMAPHORE_HPP #define RAUL_SEMAPHORE_HPP -#include <chrono> -#include <stdexcept> - #ifdef __APPLE__ # include <mach/mach.h> #elif defined(_WIN32) # include <windows.h> #else -# include <errno.h> +# include <cerrno> +# include <ctime> # include <semaphore.h> -# include <time.h> #endif +#include <chrono> +#include <stdexcept> + namespace Raul { /** diff --git a/raul/Socket.hpp b/raul/Socket.hpp index fed58dd..7da4388 100644 --- a/raul/Socket.hpp +++ b/raul/Socket.hpp @@ -17,21 +17,21 @@ #ifndef RAUL_SOCKET_HPP #define RAUL_SOCKET_HPP -#include <memory> -#include <string> +#include "raul/Noncopyable.hpp" -#include <errno.h> #include <netdb.h> #include <netinet/in.h> #include <poll.h> -#include <stdint.h> -#include <stdlib.h> -#include <string.h> #include <sys/socket.h> #include <sys/un.h> #include <unistd.h> -#include "raul/Noncopyable.hpp" +#include <cerrno> +#include <cstdint> +#include <cstdlib> +#include <cstring> +#include <memory> +#include <string> namespace Raul { diff --git a/raul/Symbol.hpp b/raul/Symbol.hpp index 1ec775f..1189b7b 100644 --- a/raul/Symbol.hpp +++ b/raul/Symbol.hpp @@ -17,10 +17,10 @@ #ifndef RAUL_SYMBOL_HPP #define RAUL_SYMBOL_HPP -#include <string> - #include "raul/Exception.hpp" +#include <string> + namespace Raul { /** A restricted string which is a valid C identifier and Path component. diff --git a/raul/TimeSlice.hpp b/raul/TimeSlice.hpp index 5cc1dc2..92979b0 100644 --- a/raul/TimeSlice.hpp +++ b/raul/TimeSlice.hpp @@ -17,12 +17,12 @@ #ifndef RAUL_TIME_SLICE_HPP #define RAUL_TIME_SLICE_HPP -#include <cassert> -#include <cmath> - #include "raul/Noncopyable.hpp" #include "raul/TimeStamp.hpp" +#include <cassert> +#include <cmath> + namespace Raul { /* FIXME: all the conversion here is wrong now */ diff --git a/raul/TimeStamp.hpp b/raul/TimeStamp.hpp index ef0df5d..dbbc163 100644 --- a/raul/TimeStamp.hpp +++ b/raul/TimeStamp.hpp @@ -17,10 +17,9 @@ #ifndef RAUL_TIME_STAMP_HPP #define RAUL_TIME_STAMP_HPP -#include <math.h> -#include <stdint.h> - #include <cassert> +#include <cmath> +#include <cstdint> #include <iostream> #include <limits> diff --git a/test/array_test.cpp b/test/array_test.cpp index ea9eb13..a1a4132 100644 --- a/test/array_test.cpp +++ b/test/array_test.cpp @@ -14,10 +14,10 @@ along with Raul. If not, see <http://www.gnu.org/licenses/>. */ -#include <stdio.h> - #include "raul/Array.hpp" +#include <cstdio> + int main(int argc, char** argv) { diff --git a/test/maid_test.cpp b/test/maid_test.cpp index e21ba04..a692c1d 100644 --- a/test/maid_test.cpp +++ b/test/maid_test.cpp @@ -16,13 +16,16 @@ #undef NDEBUG +#include "raul/Maid.hpp" + +#include <atomic> #include <cassert> +#include <chrono> #include <cstdio> +#include <memory> #include <thread> #include <vector> -#include "raul/Maid.hpp" - using Raul::Maid; static const size_t n_threads = 8; diff --git a/test/path_test.cpp b/test/path_test.cpp index 01f55c0..3b7b61b 100644 --- a/test/path_test.cpp +++ b/test/path_test.cpp @@ -14,10 +14,12 @@ along with Raul. If not, see <http://www.gnu.org/licenses/>. */ +#include "raul/Path.hpp" +#include "raul/Symbol.hpp" + #include <cstring> #include <iostream> - -#include "raul/Path.hpp" +#include <string> using namespace std; using namespace Raul; diff --git a/test/ringbuffer_test.cpp b/test/ringbuffer_test.cpp index 7fc4042..1c488be 100644 --- a/test/ringbuffer_test.cpp +++ b/test/ringbuffer_test.cpp @@ -14,16 +14,16 @@ along with Raul. If not, see <http://www.gnu.org/licenses/>. */ +#include "raul/RingBuffer.hpp" + #include <climits> +#include <cstdint> #include <cstdio> -#include <cstdlib> #include <cstring> -#include <iostream> +#include <memory> #include <string> #include <thread> -#include "raul/RingBuffer.hpp" - using namespace std; using namespace Raul; diff --git a/test/sem_test.cpp b/test/sem_test.cpp index f44fc5e..8daf82b 100644 --- a/test/sem_test.cpp +++ b/test/sem_test.cpp @@ -16,14 +16,12 @@ #undef NDEBUG +#include "raul/Semaphore.hpp" + #include <cassert> #include <chrono> -#include <iostream> -#include <limits> #include <thread> -#include "raul/Semaphore.hpp" - static void wait_for_sem(Raul::Semaphore* sem) { diff --git a/test/socket_test.cpp b/test/socket_test.cpp index 8dd4aff..2472c21 100644 --- a/test/socket_test.cpp +++ b/test/socket_test.cpp @@ -14,19 +14,24 @@ along with Raul. If not, see <http://www.gnu.org/licenses/>. */ -#include <stdio.h> -#include <sys/types.h> +#include "raul/Socket.hpp" + +#include <poll.h> #include <sys/wait.h> #include <unistd.h> -#include "raul/Socket.hpp" - -using namespace std; -using namespace Raul; +#include <cerrno> +#include <cstdio> +#include <cstring> +#include <memory> +#include <string> +#include <utility> int main(int argc, char** argv) { + using Socket = Raul::Socket; + std::string unix_uri("unix:///tmp/raul_test_sock"); std::string tcp_uri("tcp://127.0.0.1:12345"); diff --git a/test/symbol_test.cpp b/test/symbol_test.cpp index 5164998..edc8879 100644 --- a/test/symbol_test.cpp +++ b/test/symbol_test.cpp @@ -14,11 +14,11 @@ along with Raul. If not, see <http://www.gnu.org/licenses/>. */ -#include <cstring> +#include "raul/Symbol.hpp" + #include <iostream> #include <list> - -#include "raul/Path.hpp" +#include <string> using namespace std; using namespace Raul; diff --git a/test/thread_test.cpp b/test/thread_test.cpp index 9012b4c..78c0ad2 100644 --- a/test/thread_test.cpp +++ b/test/thread_test.cpp @@ -14,12 +14,12 @@ along with Raul. If not, see <http://www.gnu.org/licenses/>. */ +#include "raul/Semaphore.hpp" + #include <atomic> #include <iostream> #include <thread> -#include "raul/Semaphore.hpp" - using namespace std; using namespace Raul; diff --git a/test/time_test.cpp b/test/time_test.cpp index 69416cd..c6f3d77 100644 --- a/test/time_test.cpp +++ b/test/time_test.cpp @@ -16,6 +16,8 @@ #include "raul/TimeStamp.hpp" #include "raul/TimeSlice.hpp" + +#include <cstdint> #include <iostream> using namespace std; |