Skip to content

Commit 7574a50

Browse files
committed
Fix formatting and remove extraneous empty lines
1 parent 05ef14b commit 7574a50

File tree

5 files changed

+5
-21
lines changed

5 files changed

+5
-21
lines changed

src/InternalStorage.cpp

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,17 @@ int InternalStorage::begin(){
4141

4242
if(this -> userDataFileSystem != nullptr){
4343
delete(this -> userDataFileSystem);
44-
4544
}
4645
this -> userDataFileSystem = new mbed::FATFileSystem(this->partitionName);
4746
} else {
4847

49-
if(this -> userDataFileSystem != nullptr){
50-
delete(this -> userDataFileSystem);
51-
48+
if(this -> userDataFileSystem != nullptr){
49+
delete(this -> userDataFileSystem);
5250
}
5351

54-
5552
this -> userDataFileSystem = new mbed::LittleFileSystem(this->partitionName);
5653
}
5754
int err = this -> userDataFileSystem -> mount(this -> userData);
58-
5955
if(err == 0) return 1;
6056
#endif
6157
}
@@ -69,13 +65,11 @@ Folder InternalStorage::getRootFolder(){
6965
return Folder(String("/" + String(this->partitionName)).c_str());
7066
}
7167

72-
7368
void InternalStorage::setQSPIPartition(int partition){
7469
this -> partitionNumber = partition;
7570
}
7671

7772
void InternalStorage::setQSPIPartitionName(const char * name){
78-
7973
this -> partitionName = (char *)name;
8074
}
8175

@@ -113,8 +107,8 @@ BlockDevice * InternalStorage::getBlockDevice(){
113107

114108

115109
#if defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_OPTA)
116-
mbed::BlockDevice * InternalStorage::getBlockDevice(){
117-
return this -> blockDevice;
118-
}
110+
mbed::BlockDevice * InternalStorage::getBlockDevice(){
111+
return this -> blockDevice;
112+
}
119113

120114
#endif

src/InternalStorage.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ class InternalStorage : public Arduino_UnifiedStorage {
106106
int partitionNumber = 3;
107107
#endif
108108

109-
110109
char * partitionName = "user";
111110
FileSystems fs = FS_FAT;
112111
};

src/Types.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
#include <iostream>
1010
#include <vector>
1111

12-
13-
14-
1512
static bool copyFolder(const char* source, const char* destination) {
1613
DIR* dir = opendir(source);
1714
if (dir == nullptr) {

src/UFile.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,10 @@ bool UFile::copyTo(const char* destinationPath, bool overwrite) {
220220
// Open the source file for reading
221221
FILE* sourceFile = fopen(path.c_str(), "r");
222222

223-
224-
225223
if (sourceFile == nullptr) {
226224
return false;
227225
}
228226

229-
230227
FILE* destinationFile = fopen(newPath.c_str(), "r");
231228

232229
if(destinationFile != nullptr){

src/UFile.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
class Folder;
99
#include "Folder.h"
1010

11-
12-
13-
1411
/**
1512
* Class representing a File
1613
*/

0 commit comments

Comments
 (0)