Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Generic
diff options
context:
space:
mode:
3 files changed, 3 insertions, 3 deletions
-rw-r--r--src/Generic/Date/Date.cpp2
-rw-r--r--src/Generic/Date/Date.h2
-rw-r--r--src/Generic/String/String.cpp2
diff --git a/src/Generic/Date/Date.cpp b/src/Generic/Date/Date.cpp
index db2551a..0507b21 100644
--- a/src/Generic/Date/Date.cpp
+++ b/src/Generic/Date/Date.cpp
@@ -70,7 +70,7 @@ int digitToChar(unsigned digit) {
return ' ';
}
-String Date::createCStr() {
+String Date::createString() const {
String out;
return ((((out += day) += ".") += month) += ".") += year;
}
diff --git a/src/Generic/Date/Date.h b/src/Generic/Date/Date.h
index a960678..78aca2e 100644
--- a/src/Generic/Date/Date.h
+++ b/src/Generic/Date/Date.h
@@ -25,7 +25,7 @@ public:
unsigned short get_year() const;
bool set_year(unsigned short year);
- String createCStr();
+ String createString() const;
void read(std::istream& istr);
void write(std::ostream& ostr);
diff --git a/src/Generic/String/String.cpp b/src/Generic/String/String.cpp
index 251ba0a..eb157a2 100644
--- a/src/Generic/String/String.cpp
+++ b/src/Generic/String/String.cpp
@@ -52,7 +52,7 @@ String& String::operator+=(unsigned number) {
unsigned tempLen = number / 10 + 1;
char* tmp = new char[tempLen + 1];
tmp[tempLen] = '\0';
- for (unsigned i = tempLen - 1; i >= 0; i--, number /= 10)
+ for (unsigned i = tempLen - 1; i < tempLen; i--, number /= 10)
tmp[i] = number % 10 + '0';
*this += tmp;