Bulk replace header guards to use

This commit is contained in:
David Cermak
2021-05-26 15:57:25 +02:00
parent 84b0dcfea4
commit 3332c27978
35 changed files with 38 additions and 140 deletions

View File

@ -7,8 +7,7 @@
CONDITIONS OF ANY KIND, either express or implied.
*/
#ifndef _NETWORK_DCE_H_
#define _NETWORK_DCE_H_
#pragma once
#ifdef __cplusplus
extern "C" {
@ -43,5 +42,3 @@ void modem_stop_network();
#ifdef __cplusplus
}
#endif
#endif //_NETWORK_DCE_H_

View File

@ -7,8 +7,7 @@
CONDITIONS OF ANY KIND, either express or implied.
*/
#ifndef MODEM_CONSOLE_CONSOLE_HELPER_H
#define MODEM_CONSOLE_CONSOLE_HELPER_H
#pragma once
#include <vector>
#include <algorithm>
@ -112,5 +111,3 @@ private:
std::function<bool(ConsoleCommand *)> func;
const static esp_console_cmd_func_t command_func_pts[];
};
#endif //MODEM_CONSOLE_CONSOLE_HELPER_H

View File

@ -7,8 +7,7 @@
CONDITIONS OF ANY KIND, either express or implied.
*/
#ifndef __MY_MODULE_DCE_HPP__
#define __MY_MODULE_DCE_HPP__
#pragma once
#include "cxx_include/esp_modem_dce_factory.hpp"
@ -38,6 +37,3 @@ std::unique_ptr<esp_modem::DCE> create_shiny_dce(const esp_modem::dce_config *co
{
return esp_modem::dce_factory::Factory::build_unique<MyShinyModem>(config, std::move(dte), netif);
}
#endif //__MY_MODULE_DCE_HPP__

View File

@ -6,8 +6,7 @@
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#ifndef _SIMPLE_MQTT_CLIENT_H_
#define _SIMPLE_MQTT_CLIENT_H_
#pragma once
#include <string>
#include <memory>
@ -72,6 +71,3 @@ public:
private:
std::unique_ptr<MqttClientHandle> h;
};
#endif //_SIMPLE_MQTT_CLIENT_H_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_API_HPP_
#define _ESP_MODEM_API_HPP_
#pragma once
#include <memory>
#include "cxx_include/esp_modem_dce.hpp"
@ -103,5 +102,3 @@ std::unique_ptr<DCE> create_generic_dce(const dce_config *config, std::shared_pt
*/
} // namespace esp_modem
#endif // _ESP_MODEM_API_HPP_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_CMUX_HPP_
#define _ESP_MODEM_CMUX_HPP_
#pragma once
#include "esp_modem_terminal.hpp"
@ -108,5 +107,3 @@ private:
*/
} // namespace esp_modem
#endif // _ESP_MODEM_CMUX_HPP_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_COMMAND_LIBRARY_HPP_
#define _ESP_MODEM_COMMAND_LIBRARY_HPP_
#pragma once
#include "esp_modem_dte.hpp"
#include "esp_modem_dce_module.hpp"
@ -55,5 +54,3 @@ command_result set_data_mode_sim8xx(CommandableIf* t);
} // dce_commands
} // esp_modem
#endif //_ESP_MODEM_COMMAND_LIBRARY_HPP_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_DCE_HPP_
#define _ESP_MODEM_DCE_HPP_
#pragma once
#include <utility>
#include "cxx_include/esp_modem_netif.hpp"
@ -110,5 +109,3 @@ public:
*/
} // esp_modem
#endif // _ESP_MODEM_DCE_HPP_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_DCE_FACTORY_HPP_
#define _ESP_MODEM_DCE_FACTORY_HPP_
#pragma once
/**
* @defgroup ESP_MODEM_DCE_FACTORY
@ -244,6 +243,3 @@ protected:
*/
} // namespace esp_modem::dce_factory
#endif // _ESP_MODEM_DCE_FACTORY_HPP_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_DCE_MODULE_
#define _ESP_MODEM_DCE_MODULE_
#pragma once
#include <memory>
#include <utility>
@ -146,5 +145,3 @@ public:
*/
} // namespace esp_modem
#endif // _ESP_MODEM_DCE_MODULE_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_DTE_HPP_
#define _ESP_MODEM_DTE_HPP_
#pragma once
#include <memory>
#include <cstddef>
@ -117,5 +116,3 @@ private:
*/
} // namespace esp_modem
#endif // _ESP_MODEM_DTE_HPP_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_EXCEPTION_HPP_
#define _ESP_MODEM_EXCEPTION_HPP_
#pragma once
#include <string>
#include "esp_err.h"
@ -62,5 +61,3 @@ static inline void throw_if_esp_fail(esp_err_t err)
}
} // namespace esp_modem
#endif //_ESP_MODEM_EXCEPTION_HPP_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_NETIF_HPP
#define _ESP_MODEM_NETIF_HPP
#pragma once
#include <memory>
#include <cstddef>
@ -85,5 +84,3 @@ private:
*/
} // namespace esp_modem
#endif // _ESP_MODEM_NETIF_HPP

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_PRIMITIVES_HPP_
#define _ESP_MODEM_PRIMITIVES_HPP_
#pragma once
#include "esp_event.h"
#include "esp_modem_exception.hpp"
@ -104,5 +103,3 @@ private:
};
} // namespace esp_modem
#endif // _ESP_MODEM_PRIMITIVES_HPP_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_TERMINAL_HPP_
#define _ESP_MODEM_TERMINAL_HPP_
#pragma once
#include <memory>
#include <functional>
@ -85,5 +84,3 @@ protected:
*/
} // namespace esp_modem
#endif // _ESP_MODEM_TERMINAL_HPP_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_TYPES_HPP_
#define _ESP_MODEM_TYPES_HPP_
#pragma once
#include <functional>
#include <string>
@ -103,5 +102,3 @@ public:
*/
} // namespace esp_modem
#endif // _ESP_MODEM_TYPES_HPP_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_API_H_
#define _ESP_MODEM_API_H_
#pragma once
#include "esp_err.h"
#include "generate/esp_modem_command_declare.inc"
@ -35,6 +34,3 @@ DECLARE_ALL_COMMAND_APIS(declares esp_modem_<API>(esp_modem_t * dce, ...);)
#ifdef __cplusplus
}
#endif
#endif // _CLIENT_ESP_MODEM_API_H_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_C_API_TYPES_H_
#define _ESP_MODEM_C_API_TYPES_H_
#pragma once
#include "esp_modem_config.h"
@ -98,5 +97,3 @@ esp_err_t esp_modem_set_mode(esp_modem_dce_t * dce, esp_modem_dce_mode_t mode);
#ifdef __cplusplus
}
#endif
#endif //_ESP_MODEM_C_API_TYPES_H_

View File

@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_CONFIG_H_
#define _ESP_MODEM_CONFIG_H_
#pragma once
#include "driver/uart.h"
#include "esp_modem_dce_config.h"
@ -126,5 +126,3 @@ typedef struct esp_modem_dte_config esp_modem_dte_config_t;
#ifdef __cplusplus
}
#endif
#endif // _ESP_MODEM_CONFIG_H_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_MODEM_DCE_CONFIG_H_
#define _ESP_MODEM_DCE_CONFIG_H_
#pragma once
#ifdef __cplusplus
extern "C" {
@ -48,5 +47,3 @@ struct esp_modem_dce_config {
#ifdef __cplusplus
}
#endif
#endif // _ESP_MODEM_DCE_CONFIG_H_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _VFS_CREATE_HPP_
#define _VFS_CREATE_HPP_
#pragma once
#define ESP_MODEM_VFS_DEFAULT_UART_CONFIG(name) { \
.dev_name = (name), \
@ -67,6 +66,3 @@ bool vfs_create_socket(struct esp_modem_vfs_socket_creator *config, struct esp_m
* @return true on success
*/
bool vfs_create_uart(struct esp_modem_vfs_uart_creator *config, struct esp_modem_vfs_term_config *created_config);
#endif //_VFS_CREATE_HPP_

View File

@ -11,8 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef MDNS_HOST_ESP_EVENT_H
#define MDNS_HOST_ESP_EVENT_H
#pragma once
#include <stdint.h>
#include "esp_netif.h"
@ -39,5 +38,3 @@ esp_err_t esp_event_handler_register(const char * event_base, int32_t event_id,
esp_err_t esp_event_handler_unregister(const char * event_base, int32_t event_id, void* event_handler);
typedef void * QueueHandle_t;
#endif //MDNS_HOST_ESP_EVENT_H

View File

@ -11,8 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef MDNS_HOST_ESP_EVENT_BASE_H
#define MDNS_HOST_ESP_EVENT_BASE_H
#pragma once
typedef enum {
WIFI_EVENT_STA_CONNECTED, /**< ESP32 station connected to AP */
@ -25,4 +24,3 @@ typedef enum {
typedef void * esp_event_base_t;
#endif //MDNS_HOST_ESP_EVENT_BASE_H

View File

@ -11,8 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _HOST_ESP_NETIF_H_
#define _HOST_ESP_NETIF_H_
#pragma once
#include <stdint.h>
#include <stdlib.h>
@ -63,5 +62,3 @@ void esp_netif_destroy(esp_netif_t *esp_netif);
#ifdef __cplusplus
}
#endif
#endif // _HOST_ESP_NETIF_H_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _ESP_NETIF_IP_ADDR_H_
#define _ESP_NETIF_IP_ADDR_H_
#pragma once
#include <endian.h>
@ -164,5 +163,3 @@ esp_ip6_addr_type_t esp_netif_ip6_get_addr_type(esp_ip6_addr_t* ip6_addr);
#ifdef __cplusplus
}
#endif
#endif //_ESP_NETIF_IP_ADDR_H_

View File

@ -13,10 +13,6 @@
// limitations under the License.
#ifndef _ESP_NETIF_PPP_H_
#define _ESP_NETIF_PPP_H_
#pragma once
#define NETIF_PP_PHASE_OFFSET 0x100
#endif //_ESP_NETIF_PPP_H_

View File

@ -11,6 +11,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
typedef int esp_err_t;
#define ESP_FAIL -1

View File

@ -11,8 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef MDNS_HOST_ESP_LOG_H
#define MDNS_HOST_ESP_LOG_H
#pragma once
#include <stdio.h>
@ -46,4 +45,3 @@ printf(LOG_COLOR_D); printf("(%s) ", TAG); printf(__VA_ARGS__); printf(LOG_RESET
#define ESP_LOGV(TAG, ...) do { \
printf(LOG_COLOR_V); printf("(%s) ", TAG); printf(__VA_ARGS__); printf(LOG_RESET_COLOR "\n"); } while(0)
#endif //MDNS_HOST_ESP_LOG_H

View File

@ -11,9 +11,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef MDNS_HOST_ENDIAN_H
#define MDNS_HOST_ENDIAN_H
#pragma once
#include_next "endian.h"
#endif //MDNS_HOST_ENDIAN_H

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _EXCEPTION_STUB_HPP_
#define _EXCEPTION_STUB_HPP_
#pragma once
#ifdef CONFIG_COMPILER_CXX_EXCEPTIONS
#define TRY_CATCH_OR_DO(block, action) \
@ -38,6 +37,3 @@
block
#endif
#endif // _EXCEPTION_STUB_HPP_

View File

@ -12,12 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include "esp_log.h"
#include "driver/uart.h"
#ifndef _UART_COMPAT_H_
#define _UART_COMPAT_H_
/**
* @brief This is a compatible header, which just takes care of different data ptr type
* across different IDF version in driver/uart
@ -31,5 +30,3 @@ static inline int uart_write_bytes_compat(uart_port_t uart_num, const void* src,
#endif
return uart_write_bytes(uart_num, data, size);
}
#endif //_UART_COMPAT_H_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _UART_RESOURCE_HPP_
#define _UART_RESOURCE_HPP_
#pragma once
#include "cxx_include/esp_modem_dte.hpp"
#include "esp_modem_config.h"
@ -35,5 +34,3 @@ struct uart_resource {
} // namespace esp_modem
#endif // _UART_RESOURCE_HPP_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _UART_TERMINAL_HPP_
#define _UART_TERMINAL_HPP_
#pragma once
#include "cxx_include/esp_modem_dte.hpp"
@ -25,4 +24,3 @@ std::unique_ptr<Terminal> create_uart_terminal(const esp_modem_dte_config *confi
} // namespace esp_modem
#endif // _UART_TERMINAL_HPP_

View File

@ -12,8 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef _VFS_TERMINAL_HPP_
#define _VFS_TERMINAL_HPP_
#pragma once
#include "cxx_include/esp_modem_dte.hpp"
@ -24,5 +23,3 @@ namespace esp_modem {
std::unique_ptr<Terminal> create_vfs_terminal(const esp_modem_dte_config *config);
} // namespace esp_modem
#endif // _VFS_TERMINAL_HPP_

View File

@ -1,5 +1,4 @@
#ifndef _LOOPBACKTERM_H_
#define _LOOPBACKTERM_H_
#pragma once
#include "cxx_include/esp_modem_api.hpp"
#include "cxx_include/esp_modem_terminal.hpp"
@ -32,5 +31,3 @@ private:
bool pin_ok;
bool is_bg96;
};
#endif //_LOOPBACKTERM_H_