fix(nvs_flash): removed usage of 'using namepsace std' in a header file

This commit is contained in:
timoxd7
2025-03-26 13:35:33 +01:00
parent 23c73cdc37
commit fc418cc782
4 changed files with 7 additions and 3 deletions

View File

@@ -17,6 +17,8 @@
#include "nvs_handle_locked.hpp"
#include "nvs_platform.hpp"
using namespace std;
namespace nvs {
std::unique_ptr<NVSHandle> open_nvs_handle_from_partition(const char *partition_name,

View File

@@ -5,6 +5,8 @@
*/
#include "nvs_pagemanager.hpp"
using namespace std;
namespace nvs
{
esp_err_t PageManager::load(Partition *partition, uint32_t baseSector, uint32_t sectorCount)

View File

@@ -12,6 +12,8 @@
#include "nvs_encrypted_partition.hpp"
#endif // ! LINUX_TARGET
using namespace std;
namespace nvs {
NVSPartitionManager* NVSPartitionManager::instance = nullptr;

View File

@@ -15,8 +15,6 @@
#include "compressed_enum_table.hpp"
#include "string.h"
using namespace std;
namespace nvs
{
@@ -97,7 +95,7 @@ public:
void getKey(char* dst, size_t dstSize)
{
strncpy(dst, key, min(dstSize, sizeof(key)));
strncpy(dst, key, std::min(dstSize, sizeof(key)));
dst[dstSize-1] = 0;
}