mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Some warnings fixed, MYSQL: Fixed decimal issue
git-svn-id: svn://ultimatepp.org/upp/trunk@7558 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3a3e5e5d57
commit
a06b37b77a
8 changed files with 13 additions and 13 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -12,14 +12,14 @@ Vector<S> 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<String> 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<String>(maxcount, delim, s, ignoreempty) : Vector<String>();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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); }
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ Vector<String> 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@ bool GccBuilder::Link(const Vector<String>& 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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue