Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
git-svn-id: https://projectname.googlecode.com/svn/trunk@16 c416075f-80b4-e980-4839-00ea3ed24e77
  • Loading branch information
valery.isaev@gmail.com committed Mar 28, 2011
1 parent ac33873 commit 9a616dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions trunk/src/default_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ class accumulator: public arr<boost::shared_ptr<T>, boost::shared_ptr<T> > {
public:
void next(const boost::shared_ptr<T>& t) {
_values.push_back(t);
if (_values.size() > 1) {
/* if (_values.size() > 1) {
make_pair(_values.begin(), _values.end())
>>= sink< boost::shared_ptr<T> >::continuation();
}
} */
}
void stop() {
/* if (_values.size() > 1) {
if (_values.size() > 1) {
make_pair(_values.begin(), _values.end())
>>= sink< boost::shared_ptr<T> >::continuation();
} */
}
_values.clear();
}
boost::shared_ptr< end< boost::shared_ptr<T> > > clone() const {
Expand Down
5 changes: 3 additions & 2 deletions trunk/src/file_types/img.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace file_type {

const double THRESHOLD = 0.03;
const double THRESHOLD = 0.005;

img::img(const fs::path& p, const Magick::Image& image): base(p), _image(image) {
const Magick::PixelPacket* pix = image.getConstPixels(0, 0, image.size().width(), image.size().height());
Expand Down Expand Up @@ -34,7 +34,7 @@ img::img(const fs::path& p, const Magick::Image& image): base(p), _image(image)
}

boost::shared_ptr<img> img::try_file(const boost::shared_ptr<base>& file) {
static const fs::path exts[] = { ".JPG" };
static const fs::path exts[] = { ".JPG", ".png" };
static const fs::path* exts_end = exts + sizeof(exts)/sizeof(fs::path);
if (find(exts, exts_end, file->path().extension()) != exts_end) {
try {
Expand All @@ -61,6 +61,7 @@ boost::shared_ptr<base> img::compare(const boost::shared_ptr<base>& _a) const {

inline comparison_result img::precompare(const boost::shared_ptr<base>& a) const {
return equal;
// return static_cast<const img*>(a.get())->bucket[0][0] - bucket[0][0] > THRESHOLD ? less : equal;
}

}

0 comments on commit 9a616dc

Please sign in to comment.