forked from espressif/esp-idf
fix(nvs_flash): removed usage of 'using namepsace std' in a header file
This commit is contained in:
@@ -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,
|
||||
|
@@ -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)
|
||||
|
@@ -12,6 +12,8 @@
|
||||
#include "nvs_encrypted_partition.hpp"
|
||||
#endif // ! LINUX_TARGET
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace nvs {
|
||||
|
||||
NVSPartitionManager* NVSPartitionManager::instance = nullptr;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user