c++11 fixes

git-svn-id: svn://ultimatepp.org/upp/trunk@8593 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-06-24 18:18:58 +00:00
parent ee54e7a8f4
commit 73cc9c70d8
3 changed files with 5 additions and 12 deletions

View file

@ -290,9 +290,9 @@ Image Colorize2(const Image& img, Color color, int alpha, int gray)
int div = 255 - gray;
int ao = ga - gray;
int ac = div - ao;
r = (ao * s->r + ac * r) / div;
g = (ao * s->g + ac * g) / div;
b = (ao * s->b + ac * b) / div;
r = (ao * s->r + ac * r0) / div;
g = (ao * s->g + ac * g0) / div;
b = (ao * s->b + ac * b0) / div;
}
t->r = (alpha * (r - s->r) >> 8) + s->r;
t->g = (alpha * (g - s->g) >> 8) + s->g;

View file

@ -271,8 +271,6 @@ void ParseFiles(Progress& pi, const Index<int>& parse_file)
void UpdateCodeBase2(Progress& pi)
{
CLOG("============= UpdateCodeBase2 " << GetSysTime());
const Workspace& wspc = GetIdeWorkspace();
pi.SetText("Checking source files");
pi.SetPos(0);
Index<int> keep_file;
@ -322,9 +320,7 @@ void ParseSrc(Stream& in, int file, Callback2<int, const String&> error)
Vector<String> pp;
String ext = ToLower(GetFileExt(path));
int filetype = FILE_OTHER;
SourceFileInfo& sfi = source_file[file];
Cpp cpp;
bool b = false;
if(ext == ".lay")
pp.Add(PreprocessLayFile(path));
else

View file

@ -511,7 +511,6 @@ void Navigator::Search()
else {
navigator_global = true;
const CppBase& b = CodeBase();
int ii = 0;
String usearch_nest = ToUpper(search_nest);
String usearch_name = ToUpper(search_name);
ArrayMap<String, NavItem> imap;
@ -519,8 +518,6 @@ void Navigator::Search()
for(int pass = -1; pass < 2; pass++) {
for(int i = 0; i < b.GetCount(); i++) {
String nest = b.GetKey(i);
// bool foundnest = (wholeclass ? ToUpper(nest) == search_nest
// : ToUpper(nest).Find(search_nest) >= 0) && *nest != '@';
bool foundnest = (wholeclass ? pass < 0 ? false :
pass ? ToUpper(nest) == usearch_nest
: nest == search_nest
@ -532,7 +529,6 @@ void Navigator::Search()
const Array<CppItem>& ci = b[i];
for(int j = 0; j < ci.GetCount(); j++) {
const CppItem& m = ci[j];
// if(local ? m.file == fileii : *m.uname != '@' && m.uname.Find(search_name) >= 0 || both && foundnest) {
if(local ? m.file == fileii
: *m.uname != '@' && (pass < 0 ? m.name == search_name :
pass ? m.uname.Find(usearch_name) >= 0
@ -581,7 +577,8 @@ void Navigator::Search()
IndexSort(keys, values);
for(int i = 0; i < keys.GetCount(); i++)
keys[i].Remove(0);
gitem = pick(VectorMap<String, Vector<NavItem *> > (keys, values));
VectorMap<String, Vector<NavItem *> > h(pick(keys), pick(values));
gitem = pick(h);
for(int i = 0; i < gitem.GetCount(); i++)
Sort(gitem[i], sorting ? SortByNames : SortByLines);
}