diff --git a/uppsrc/IconDes/Image.cpp b/uppsrc/IconDes/Image.cpp index f1daee397..350d27f63 100644 --- a/uppsrc/IconDes/Image.cpp +++ b/uppsrc/IconDes/Image.cpp @@ -153,7 +153,6 @@ void IconDes::SmoothRescale() Slot& c = Current(); BeginTransform(); Image bk = IsPasting() ? c.paste_image : c.image; - int r = c.paste_image.GetResolution(); dlg.cx <<= bk.GetWidth(); dlg.cy <<= bk.GetHeight(); dlg.keep <<= true; diff --git a/uppsrc/IconDes/List.cpp b/uppsrc/IconDes/List.cpp index 8e27ff07e..60a99a199 100644 --- a/uppsrc/IconDes/List.cpp +++ b/uppsrc/IconDes/List.cpp @@ -384,6 +384,7 @@ void IconDes::EditImage() int r = c.image.GetResolution(); c.image = CreateImage(Size(minmax((int)~dlg.cx, 1, 8192), minmax((int)~dlg.cy, 1, 8192)), Null); UPP::Copy(c.image, Point(0, 0), img, img.GetSize()); + SetRes(c.image, r); Reset(); } } @@ -482,9 +483,7 @@ int IconDes::GetCount() const Image IconDes::GetImage(int ii) const { - const Slot& c = slot[ii]; - Image m = slot[ii].image; - return m; + return slot[ii].image; } String IconDes::GetName(int ii) const diff --git a/uppsrc/TextDiffCtrl/TextDiff.cpp b/uppsrc/TextDiffCtrl/TextDiff.cpp index 61b02bd42..b440bc13c 100644 --- a/uppsrc/TextDiffCtrl/TextDiff.cpp +++ b/uppsrc/TextDiffCtrl/TextDiff.cpp @@ -145,7 +145,7 @@ bool TextComparator::Find(int start1, int end1, int start2, int end2, int& best_ int last = max(best_count - chunk + 1, 0); const HashBase *hp1 = &hash1[lvl]; const HashBase *hp2 = &hash2[lvl]; - const unsigned *h1 = hp1->Begin() + start1; + const unsigned *h1 = hp1->begin() + start1; int i = hp2->Find(*h1); while(i >= 0) @@ -154,8 +154,8 @@ bool TextComparator::Find(int start1, int end1, int start2, int end2, int& best_ else { if(i >= start2 && h1[last] == (*hp2)[i + last]) { int top = min(len1, end2 - i); - int hc = CompareGetCount(h1, hp2->Begin() + i, top) + chunk - 1; - int cnt = CompareGetCount(f1, file2.Begin() + i, min(hc, top)); + int hc = CompareGetCount(h1, hp2->begin() + i, top) + chunk - 1; + int cnt = CompareGetCount(f1, file2.begin() + i, min(hc, top)); if(cnt > best_count) { best_count = cnt; best_match = i; @@ -168,7 +168,7 @@ bool TextComparator::Find(int start1, int end1, int start2, int end2, int& best_ last = best_count - chunk + 1; hp1 = &hash1[lvl]; hp2 = &hash2[lvl]; - h1 = hp1->Begin() + start1; + h1 = hp1->begin() + start1; int oi = i; for(i = hp2->Find(*h1); i >= 0 && i <= oi; i = hp2->FindNext(i)) ;