File tree Expand file tree Collapse file tree 3 files changed +469
-877
lines changed Expand file tree Collapse file tree 3 files changed +469
-877
lines changed Original file line number Diff line number Diff line change @@ -39,20 +39,12 @@ bool STORESTRINGS_CLASS::setsize(int size)
39
39
_maxsize=size;
40
40
return true ;
41
41
}
42
- bool STORESTRINGS_CLASS::setlenght (int lenght )
42
+ bool STORESTRINGS_CLASS::setlength (int len )
43
43
{
44
- if (lenght< 4 ) return false ;
45
- _maxstringlength=lenght ;
44
+ if (len < 4 ) return false ;
45
+ _maxstringlength = len ;
46
46
return true ;
47
47
}
48
- int STORESTRINGS_CLASS::getsize ()
49
- {
50
- return _maxsize;
51
- }
52
- int STORESTRINGS_CLASS::getlenght ()
53
- {
54
- return _maxstringlength;
55
- }
56
48
57
49
// Clear list and content
58
50
void STORESTRINGS_CLASS::clear (){
@@ -65,11 +57,6 @@ void STORESTRINGS_CLASS::clear(){
65
57
}
66
58
}
67
59
68
- bool STORESTRINGS_CLASS::add (String & string)
69
- {
70
- return add (string.c_str ());
71
- }
72
-
73
60
bool STORESTRINGS_CLASS::add (const __FlashStringHelper *str)
74
61
{
75
62
String stmp;
@@ -138,10 +125,4 @@ int STORESTRINGS_CLASS::get_index(const char * string)
138
125
// if not found return -1
139
126
return -1 ;
140
127
}
141
- // Number of elements in list
142
- int STORESTRINGS_CLASS::size ()
143
- {
144
- return _charlist.size ();
145
- }
146
-
147
128
Original file line number Diff line number Diff line change @@ -28,17 +28,18 @@ class STORESTRINGS_CLASS
28
28
STORESTRINGS_CLASS (int maxsize = -1 , int maxstringlength=-1 );
29
29
~STORESTRINGS_CLASS ();
30
30
bool add (const char * string);
31
- bool add (String & string);
31
+ inline bool add (String & string) { return add (string. c_str ());} ;
32
32
bool add (const __FlashStringHelper *str);
33
33
bool remove (int pos);
34
34
const char * get (int pos);
35
35
int get_index (const char * string);
36
36
void clear ();
37
- int size ();
37
+ inline int size () { return _charlist. size ();} ;
38
38
bool setsize (int size);
39
- bool setlenght (int lenght);
40
- int getsize ();
41
- int getlenght ();
39
+ bool setlength (int len);
40
+ inline int getsize () {return _maxsize;};
41
+ inline int getlength () {return _maxstringlength;};
42
+
42
43
private:
43
44
int _maxsize;
44
45
int _maxstringlength;
You can’t perform that action at this time.
0 commit comments