From d65d7ae310283566c30e6f014eddbd249c53ffe2 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Sat, 1 Apr 2023 18:13:52 +0400 Subject: [PATCH] Use pragma once --- roc_jni/src/main/headers/channel_set.h | 7 ++----- roc_jni/src/main/headers/clock_source.h | 7 ++----- roc_jni/src/main/headers/common.h | 7 ++----- roc_jni/src/main/headers/endpoint.h | 7 ++----- roc_jni/src/main/headers/fec_encoding.h | 7 ++----- roc_jni/src/main/headers/frame_encoding.h | 7 ++----- roc_jni/src/main/headers/packet_encoding.h | 7 ++----- roc_jni/src/main/headers/protocol.h | 7 ++----- roc_jni/src/main/headers/resampler_backend.h | 7 ++----- roc_jni/src/main/headers/resampler_profile.h | 7 ++----- 10 files changed, 20 insertions(+), 50 deletions(-) diff --git a/roc_jni/src/main/headers/channel_set.h b/roc_jni/src/main/headers/channel_set.h index 40f0a961..afbdeb0b 100644 --- a/roc_jni/src/main/headers/channel_set.h +++ b/roc_jni/src/main/headers/channel_set.h @@ -1,7 +1,6 @@ -#include +#pragma once -#ifndef CHANNEL_SET_H_ -#define CHANNEL_SET_H_ +#include #include "common.h" @@ -10,5 +9,3 @@ #define CHANNEL_SET_CLASS PACKAGE_BASE_NAME "/ChannelSet" roc_channel_set get_channel_set(JNIEnv* env, jobject jchannel_set); - -#endif /* CHANNEL_SET_H_ */ diff --git a/roc_jni/src/main/headers/clock_source.h b/roc_jni/src/main/headers/clock_source.h index 27e425c4..eee68e88 100644 --- a/roc_jni/src/main/headers/clock_source.h +++ b/roc_jni/src/main/headers/clock_source.h @@ -1,7 +1,6 @@ -#include +#pragma once -#ifndef CLOCK_SOURCE_H_ -#define CLOCK_SOURCE_H_ +#include #include "common.h" @@ -10,5 +9,3 @@ #define CLOCK_SOURCE_CLASS PACKAGE_BASE_NAME "/ClockSource" roc_clock_source get_clock_source(JNIEnv* env, jobject jclock_source); - -#endif /* CLOCK_SOURCE_H_ */ diff --git a/roc_jni/src/main/headers/common.h b/roc_jni/src/main/headers/common.h index 57b6fdb7..143f88b3 100644 --- a/roc_jni/src/main/headers/common.h +++ b/roc_jni/src/main/headers/common.h @@ -1,7 +1,6 @@ -#include +#pragma once -#ifndef COMMON_H_ -#define COMMON_H_ +#include #include #include @@ -30,5 +29,3 @@ void set_int_field_value(JNIEnv* env, jclass clazz, jobject obj, const char* att int get_enum_value(JNIEnv* env, jclass clazz, jobject enumObj); jobject get_object_field( JNIEnv* env, jclass clazz, jobject obj, const char* attr_name, const char* attr_class_name); - -#endif /* COMMON_H_ */ diff --git a/roc_jni/src/main/headers/endpoint.h b/roc_jni/src/main/headers/endpoint.h index c4b3f71b..c46c22e9 100644 --- a/roc_jni/src/main/headers/endpoint.h +++ b/roc_jni/src/main/headers/endpoint.h @@ -1,12 +1,9 @@ -#include +#pragma once -#ifndef ENDPOINT_H_ -#define ENDPOINT_H_ +#include #include int endpoint_unmarshal(JNIEnv* env, roc_endpoint** endpoint, jobject jendpoint); void endpoint_set_port(JNIEnv* env, jobject endpoint, int port); - -#endif /* ENDPOINT_H_ */ diff --git a/roc_jni/src/main/headers/fec_encoding.h b/roc_jni/src/main/headers/fec_encoding.h index fdc3730f..3d4efe46 100644 --- a/roc_jni/src/main/headers/fec_encoding.h +++ b/roc_jni/src/main/headers/fec_encoding.h @@ -1,7 +1,6 @@ -#include +#pragma once -#ifndef FEC_ENCODING_H_ -#define FEC_ENCODING_H_ +#include #include "common.h" @@ -10,5 +9,3 @@ #define FEC_ENCODING_CLASS PACKAGE_BASE_NAME "/FecEncoding" roc_fec_encoding get_fec_encoding(JNIEnv* env, jobject jfec_encoding); - -#endif /* FEC_ENCODING_H_ */ diff --git a/roc_jni/src/main/headers/frame_encoding.h b/roc_jni/src/main/headers/frame_encoding.h index 346d106d..a1671beb 100644 --- a/roc_jni/src/main/headers/frame_encoding.h +++ b/roc_jni/src/main/headers/frame_encoding.h @@ -1,7 +1,6 @@ -#include +#pragma once -#ifndef FRAME_ENCODING_H_ -#define FRAME_ENCODING_H_ +#include #include "common.h" @@ -10,5 +9,3 @@ #define FRAME_ENCODING_CLASS PACKAGE_BASE_NAME "/FrameEncoding" roc_frame_encoding get_frame_encoding(JNIEnv* env, jobject jframe_encoding); - -#endif /* FRAME_ENCODING_H_ */ diff --git a/roc_jni/src/main/headers/packet_encoding.h b/roc_jni/src/main/headers/packet_encoding.h index db150c9e..bb439049 100644 --- a/roc_jni/src/main/headers/packet_encoding.h +++ b/roc_jni/src/main/headers/packet_encoding.h @@ -1,7 +1,6 @@ -#include +#pragma once -#ifndef PACKET_ENCODING_H_ -#define PACKET_ENCODING_H_ +#include #include "common.h" @@ -10,5 +9,3 @@ #define PACKET_ENCODING_CLASS PACKAGE_BASE_NAME "/PacketEncoding" roc_packet_encoding get_packet_encoding(JNIEnv* env, jobject jpacket_encoding); - -#endif /* PACKET_ENCODING_H_ */ diff --git a/roc_jni/src/main/headers/protocol.h b/roc_jni/src/main/headers/protocol.h index 55e10078..851fc05d 100644 --- a/roc_jni/src/main/headers/protocol.h +++ b/roc_jni/src/main/headers/protocol.h @@ -1,7 +1,6 @@ -#include +#pragma once -#ifndef PROTOCOL_H_ -#define PROTOCOL_H_ +#include #include "common.h" @@ -12,5 +11,3 @@ roc_protocol get_protocol(JNIEnv* env, jobject jprotocol); jobject get_protocol_enum(JNIEnv* env, roc_protocol protocol); - -#endif /* PROTOCOL_H_ */ diff --git a/roc_jni/src/main/headers/resampler_backend.h b/roc_jni/src/main/headers/resampler_backend.h index b9134948..8c0fc6c3 100644 --- a/roc_jni/src/main/headers/resampler_backend.h +++ b/roc_jni/src/main/headers/resampler_backend.h @@ -1,7 +1,6 @@ -#include +#pragma once -#ifndef RESAMPLER_BACKEND_H_ -#define RESAMPLER_BACKEND_H_ +#include #include "common.h" @@ -10,5 +9,3 @@ #define RESAMPLER_BACKEND_CLASS PACKAGE_BASE_NAME "/ResamplerBackend" roc_resampler_backend get_resampler_backend(JNIEnv* env, jobject jresampler_backend); - -#endif /* RESAMPLER_BACKEND_H_ */ diff --git a/roc_jni/src/main/headers/resampler_profile.h b/roc_jni/src/main/headers/resampler_profile.h index 8b3fb007..f990ce66 100644 --- a/roc_jni/src/main/headers/resampler_profile.h +++ b/roc_jni/src/main/headers/resampler_profile.h @@ -1,7 +1,6 @@ -#include +#pragma once -#ifndef RESAMPLER_PROFILE_H_ -#define RESAMPLER_PROFILE_H_ +#include #include "common.h" @@ -10,5 +9,3 @@ #define RESAMPLER_PROFILE_CLASS PACKAGE_BASE_NAME "/ResamplerProfile" roc_resampler_profile get_resampler_profile(JNIEnv* env, jobject jresampler_profile); - -#endif /* RESAMPLER_PROFILE_H_ */