summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-01-03 17:14:28 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-01-03 17:14:28 -0300
commite8fbf39f886b2b5dbf5e14f07cd1dbefe8d48bf4 (patch)
treef767c7db6b089cdc6d4c56cce09a2c65fa68e274 /core
parentb988f016fd2ae1fc6fab4daa1eb580e1446dbd8d (diff)
-Replaced tinyjpg for jpgd (public domain), fixes progressive encoded jpgs and speeds up. Closes #2040
-Removed support of loading BitMap as image, now it must be load as a pnm, also closes #2040
Diffstat (limited to 'core')
-rw-r--r--core/ustring.cpp10
-rw-r--r--core/ustring.h2
2 files changed, 8 insertions, 4 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp
index c93fb80ca8..21c0d78fdb 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -1636,12 +1636,16 @@ int64_t String::to_int64() const {
return integer*sign;
}
-int String::to_int(const char* p_str) {
+int String::to_int(const char* p_str,int p_len) {
int to=0;
- while(p_str[to]!=0 && p_str[to]!='.')
- to++;
+ if (p_len>=0)
+ to=p_len;
+ else {
+ while(p_str[to]!=0 && p_str[to]!='.')
+ to++;
+ }
int integer=0;
diff --git a/core/ustring.h b/core/ustring.h
index 4c76b8e863..2b967d368a 100644
--- a/core/ustring.h
+++ b/core/ustring.h
@@ -144,7 +144,7 @@ public:
int to_int() const;
int64_t to_int64() const;
- static int to_int(const char* p_str);
+ static int to_int(const char* p_str, int p_len=-1);
static double to_double(const char* p_str);
static double to_double(const CharType* p_str, const CharType **r_end=NULL);
static int64_t to_int(const CharType* p_str,int p_len=-1);