Skip to content

Commit

Permalink
chore: Reorder includes
Browse files Browse the repository at this point in the history
New order:
  - roc includes go first
  - then 3rdparty libs
  - then system headers
  • Loading branch information
gavv committed Aug 13, 2024
1 parent 150458a commit ef74778
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#include "roc_core/backtrace.h"
#include "roc_core/console.h"

#include <cxxabi.h>
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include <unwind.h>

#include "roc_core/backtrace.h"
#include "roc_core/console.h"

namespace roc {
namespace core {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#include <android/log.h>

#include "roc_core/console.h"
#include "roc_core/stddefs.h"

#include <android/log.h>

namespace roc {
namespace core {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#include <android/log.h>

#include "roc_core/log.h"
#include "roc_core/log_backend.h"
#include "roc_core/log.h"

#include <android/log.h>

namespace roc {
namespace core {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#include "roc_core/semaphore.h"
#include "roc_core/panic.h"

#include <mach/mach.h>
#include <mach/sync_policy.h>

#include "roc_core/panic.h"
#include "roc_core/semaphore.h"

namespace roc {
namespace core {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
#ifndef ROC_CORE_SEMAPHORE_H_
#define ROC_CORE_SEMAPHORE_H_

#include <mach/semaphore.h>

#include "roc_core/attributes.h"
#include "roc_core/noncopyable.h"
#include "roc_core/time.h"

#include <mach/semaphore.h>

namespace roc {
namespace core {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#include "roc_core/backtrace.h"

#include <cxxabi.h>
#include <stdlib.h>
#include <string.h>

#include "roc_core/backtrace.h"

namespace roc {
namespace core {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define UNW_LOCAL_ONLY

// Workaround to support building with -std=c++98.
#include "roc_core/attributes.h"
#ifdef ROC_ATTR_ALIGNED
#define alignas(x) ROC_ATTR_ALIGNED(x)
#endif
Expand All @@ -22,6 +21,7 @@
#include <string.h>
#include <unistd.h>

#include "roc_core/attributes.h"
#include "roc_core/backtrace.h"
#include "roc_core/string_builder.h"

Expand Down
6 changes: 3 additions & 3 deletions src/internal_modules/roc_core/target_posix/roc_core/cond.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
#ifndef ROC_CORE_COND_H_
#define ROC_CORE_COND_H_

#include <errno.h>
#include <pthread.h>

#include "roc_core/atomic.h"
#include "roc_core/attributes.h"
#include "roc_core/mutex.h"
#include "roc_core/noncopyable.h"
#include "roc_core/time.h"

#include <errno.h>
#include <pthread.h>

namespace roc {
namespace core {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#include <signal.h>
#include <stdlib.h>
#include <unistd.h>

#include "roc_core/crash_handler.h"
#include "roc_core/die.h"
#include "roc_core/errno_to_str.h"
#include "roc_core/log.h"
#include "roc_core/panic.h"

#include <signal.h>
#include <stdlib.h>
#include <unistd.h>

namespace roc {
namespace core {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
#ifndef ROC_CORE_CRASH_HANDLER_H_
#define ROC_CORE_CRASH_HANDLER_H_

#include <signal.h>

#include "roc_core/noncopyable.h"

#include <signal.h>

namespace roc {
namespace core {

Expand Down
8 changes: 4 additions & 4 deletions src/internal_modules/roc_core/target_posix/roc_core/die.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#include "roc_core/die.h"
#include "roc_core/atomic_ops.h"
#include "roc_core/backtrace.h"

#include <signal.h>
#include <stdlib.h>
#include <unistd.h>

#include "roc_core/atomic_ops.h"
#include "roc_core/backtrace.h"
#include "roc_core/die.h"

namespace roc {
namespace core {

Expand Down
6 changes: 3 additions & 3 deletions src/internal_modules/roc_core/target_posix/roc_core/mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
#ifndef ROC_CORE_MUTEX_H_
#define ROC_CORE_MUTEX_H_

#include <errno.h>
#include <pthread.h>

#include "roc_core/atomic.h"
#include "roc_core/attributes.h"
#include "roc_core/errno_to_str.h"
#include "roc_core/noncopyable.h"
#include "roc_core/panic.h"
#include "roc_core/scoped_lock.h"

#include <errno.h>
#include <pthread.h>

namespace roc {
namespace core {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
#ifndef ROC_CORE_SINGLETON_H_
#define ROC_CORE_SINGLETON_H_

#include <pthread.h>

#include "roc_core/aligned_storage.h"
#include "roc_core/atomic_ops.h"
#include "roc_core/noncopyable.h"
#include "roc_core/panic.h"

#include <pthread.h>

namespace roc {
namespace core {

Expand Down
14 changes: 7 additions & 7 deletions src/internal_modules/roc_core/target_posix/roc_core/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#include "roc_core/thread.h"
#include "roc_core/errno_to_str.h"
#include "roc_core/log.h"
#include "roc_core/panic.h"

#include <unistd.h>

#if defined(__linux__)
#include <sys/syscall.h>
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
Expand All @@ -14,13 +21,6 @@
#include <lwp.h>
#endif

#include <unistd.h>

#include "roc_core/errno_to_str.h"
#include "roc_core/log.h"
#include "roc_core/panic.h"
#include "roc_core/thread.h"

namespace roc {
namespace core {

Expand Down
4 changes: 2 additions & 2 deletions src/internal_modules/roc_core/target_posix/roc_core/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
#ifndef ROC_CORE_THREAD_H_
#define ROC_CORE_THREAD_H_

#include <pthread.h>

#include "roc_core/atomic.h"
#include "roc_core/attributes.h"
#include "roc_core/mutex.h"
#include "roc_core/noncopyable.h"
#include "roc_core/stddefs.h"

#include <pthread.h>

namespace roc {
namespace core {

Expand Down
8 changes: 4 additions & 4 deletions src/internal_modules/roc_core/target_posix/roc_core/time.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#include "roc_core/time.h"
#include "roc_core/errno_to_str.h"
#include "roc_core/panic.h"

#include <errno.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>

#include "roc_core/errno_to_str.h"
#include "roc_core/panic.h"
#include "roc_core/time.h"

namespace roc {
namespace core {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#include <errno.h>
#include <time.h>

#include "roc_core/semaphore.h"
#include "roc_core/cpu_instructions.h"
#include "roc_core/errno_to_str.h"
#include "roc_core/panic.h"
#include "roc_core/semaphore.h"

#include <errno.h>
#include <time.h>

namespace roc {
namespace core {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
#ifndef ROC_CORE_SEMAPHORE_H_
#define ROC_CORE_SEMAPHORE_H_

#include <semaphore.h>

#include "roc_core/atomic.h"
#include "roc_core/attributes.h"
#include "roc_core/noncopyable.h"
#include "roc_core/time.h"

#include <semaphore.h>

namespace roc {
namespace core {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#include "roc_core/console.h"
#include "roc_core/atomic_ops.h"

#include <pthread.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#include "roc_core/atomic_ops.h"
#include "roc_core/console.h"

// ANSI Color Codes.
#define COLOR_NONE ""
#define COLOR_START "\033["
Expand Down

0 comments on commit ef74778

Please sign in to comment.