diff --git a/uppsrc/CodeEditor/CHighlight.cpp b/uppsrc/CodeEditor/CHighlight.cpp index e46dc59ea..c78db3c4a 100644 --- a/uppsrc/CodeEditor/CHighlight.cpp +++ b/uppsrc/CodeEditor/CHighlight.cpp @@ -67,7 +67,7 @@ void CSyntax::Highlight(const wchar *ltext, const wchar *e, HighlightOutput& hls next.ScanSyntax(ltext, e, line + 1, tabsize); bool macro = next.macro != MACRO_OFF; - int linelen = e - ltext; + int linelen = int(e - ltext); const wchar *p = ltext; Grounding(p, e); @@ -216,7 +216,7 @@ void CSyntax::Highlight(const wchar *ltext, const wchar *e, HighlightOutput& hls bool isDot, isFloat = false; if(*p == '0') c = INK_CONST_OCT; while(IsDigit(*p)) p++; - int fixdigits = p - t; + int fixdigits = int(p - t); if(*p == '.' || (*p == 'e' || *p == 'E') && highlight != HIGHLIGHT_CSS) { if(*p == '.') isDot = true; diff --git a/uppsrc/Core/SplitMerge.cpp b/uppsrc/Core/SplitMerge.cpp index 4e2e18c2c..5177ccd62 100644 --- a/uppsrc/Core/SplitMerge.cpp +++ b/uppsrc/Core/SplitMerge.cpp @@ -12,14 +12,14 @@ Vector SplitGeneric(int maxcount, const F& delim, const Char *s, bool ignoree const Char *q = delim(t); if(q) { if(!ignoreempty || t > s) - r.Add().Set(s, t - s); // This is faster than r.Add(String(s, t))... + r.Add().Set(s, int(t - s)); // This is faster than r.Add(String(s, t))... t = s = q; } else t++; } if((!ignoreempty || t > s) && r.GetCount() < maxcount) - r.Add().Set(s, t - s); + r.Add().Set(s, int(t - s)); return r; } @@ -62,7 +62,7 @@ Vector Split(int maxcount, const char *s, const char *text, bool ignoree { SplitDelimText__ delim; delim.ds = text; - delim.l = strlen(text); + delim.l = (int)strlen(text); return delim.l ? SplitGeneric(maxcount, delim, s, ignoreempty) : Vector(); } diff --git a/uppsrc/Core/Stream.h b/uppsrc/Core/Stream.h index 5c8dbe010..ea6bb3a74 100644 --- a/uppsrc/Core/Stream.h +++ b/uppsrc/Core/Stream.h @@ -86,7 +86,7 @@ public: const byte *PeekPtr(int size = 1){ ASSERT(size > 0); return ptr + size <= rdlim ? ptr : NULL; } const byte *GetPtr(int size = 1) { ASSERT(size > 0); if(ptr + size <= rdlim) { byte *p = ptr; ptr += size; return p; }; return NULL; } byte *PutPtr(int size = 1) { ASSERT(size > 0); if(ptr + size <= wrlim) { byte *p = ptr; ptr += size; return p; }; return NULL; } - const byte *GetSzPtr(int& size) { Term(); size = rdlim - ptr; byte *p = ptr; ptr += size; return p; } + const byte *GetSzPtr(int& size) { Term(); size = int(rdlim - ptr); byte *p = ptr; ptr += size; return p; } void Put(const void *data, int size) { ASSERT(size >= 0); if(ptr + size <= wrlim) { memcpy(ptr, data, size); ptr += size; } else _Put(data, size); } int Get(void *data, int size) { ASSERT(size >= 0); if(ptr + size <= rdlim) { memcpy(data, ptr, size); ptr += size; return size; } return _Get(data, size); } diff --git a/uppsrc/MySql/MySql.cpp b/uppsrc/MySql/MySql.cpp index 86d04bce2..16b9d4e06 100644 --- a/uppsrc/MySql/MySql.cpp +++ b/uppsrc/MySql/MySql.cpp @@ -337,7 +337,7 @@ bool MySqlConnection::Execute() { case FIELD_TYPE_DECIMAL: case FIELD_TYPE_FLOAT: case FIELD_TYPE_DOUBLE: - case FIELD_TYPE_NEW_DECIMAL: + case FIELD_TYPE_NEWDECIMAL: f.type = DOUBLE_V; break; case FIELD_TYPE_DATE: diff --git a/uppsrc/TextDiffCtrl/TextDiff.cpp b/uppsrc/TextDiffCtrl/TextDiff.cpp index fb2e831a1..db3cf75d2 100644 --- a/uppsrc/TextDiffCtrl/TextDiff.cpp +++ b/uppsrc/TextDiffCtrl/TextDiff.cpp @@ -31,7 +31,7 @@ Vector GetLineMap(Stream& stream) while(emp-- > 0) out.Add(Null); if(e != f) - s.Trim(e - p); + s.Trim(int(e - p)); out.Add(s); emp = 0; } diff --git a/uppsrc/ide/Builders/GccBuilder.icpp b/uppsrc/ide/Builders/GccBuilder.icpp index 98488def2..7faa04207 100644 --- a/uppsrc/ide/Builders/GccBuilder.icpp +++ b/uppsrc/ide/Builders/GccBuilder.icpp @@ -467,7 +467,7 @@ bool GccBuilder::Link(const Vector& linkfile, const String& linkoptions, while(--c >= ~ln) if(!IsDigit(*c) && *c != '.') break; - int pos = c - ~ln - 2; + int pos = int(c - ~ln - 2); if(pos >= 0 && ToLower(ln.Mid(pos, 3)) == ".so") ext = ".so"; } diff --git a/uppsrc/ide/Errors.cpp b/uppsrc/ide/Errors.cpp index 99351f157..fcfcec132 100644 --- a/uppsrc/ide/Errors.cpp +++ b/uppsrc/ide/Errors.cpp @@ -71,7 +71,7 @@ bool Ide::FindLineError(const String& ln, FindLineErrorCache& cache, ErrorInfo& if(p.Char(':') && p.IsInt()) f.linepos = p.ReadInt(); const char *ms = p.GetPtr(); - int pos = ms - ~ln; + int pos = int(ms - ~ln); f.kind = ln.Find("warning", pos) > 0 ? 2 : ln.Find("error", pos) > 0 ? 1 : ln.Find("note", pos) > 0 ? 3 : 4; diff --git a/uppsrc/ide/FindInFiles.cpp b/uppsrc/ide/FindInFiles.cpp index d16938d80..0366a258e 100644 --- a/uppsrc/ide/FindInFiles.cpp +++ b/uppsrc/ide/FindInFiles.cpp @@ -65,7 +65,7 @@ bool Match(const char *f, const char *s, bool we, bool ignorecase, int& count) { f++; for(;;) { if(Match(f, s, we, ignorecase, count)) { - count += s - b; + count += int(s - b); return true; } if(!*s++) break; @@ -102,7 +102,7 @@ bool Match(const char *f, const char *s, bool we, bool ignorecase, int& count) { } f++; } - count = s - b; + count = int(s - b); return we && iscid(*s) ? false : true; } @@ -138,7 +138,7 @@ bool Ide::SearchInFile(const String& fn, const String& pattern, bool wholeword, else for(const char *s = line; *s; s++) { if(bw && Match(pattern, s, we, ignorecase, count)) { - AddFoundFile(fn, ln, line, s - line, count); + AddFoundFile(fn, ln, line, int(s - line), count); infile++; n++; break;