From ffba6ae904deaef040defebcc0ff6f7458dbb969 Mon Sep 17 00:00:00 2001 From: Diederik van Lierop Date: Sat, 30 Oct 2010 00:07:10 +0200 Subject: - Constrained snap: proper implementation of the preference to snap the mouse pointer or handle itself (instead of projecting it first onto the constraint) - Fix a crash in SnapManager::multipleConstrainedSnaps (bzr r9866) --- src/util/mathfns.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/util') diff --git a/src/util/mathfns.h b/src/util/mathfns.h index 20c06145a..e208ca93f 100644 --- a/src/util/mathfns.h +++ b/src/util/mathfns.h @@ -48,7 +48,7 @@ inline double round_to_nearest_multiple_plus(double x, double const c1, double c * If c1==0 (and c0 is finite), then returns +/-inf. This makes grid spacing of zero * mean "ignore the grid in this dimension". */ -inline double round_to_lower_multiple_plus(double x, double const c1, double const c0) +inline double round_to_lower_multiple_plus(double x, double const c1, double const c0 = 0) { return floor((x - c0) / c1) * c1 + c0; } @@ -60,7 +60,7 @@ inline double round_to_lower_multiple_plus(double x, double const c1, double con * If c1==0 (and c0 is finite), then returns +/-inf. This makes grid spacing of zero * mean "ignore the grid in this dimension". */ -inline double round_to_upper_multiple_plus(double x, double const c1, double const c0) +inline double round_to_upper_multiple_plus(double x, double const c1, double const c0 = 0) { return ceil((x - c0) / c1) * c1 + c0; } -- cgit v1.2.3 From 144819c918dc761641c3cb5a490205fb73194ee3 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Wed, 17 Nov 2010 13:12:56 +1100 Subject: Super duper mega (fun!) commit: replaced encoding=utf-8 with fileencoding=utf-8 in all 1074 Vim modelines. The reason for this is that (a) setting the encoding isn't nice, and (b) Vim 7.3 (with modeline enabled) disallows it and pops up an error whenever you open any file with it ("invalid modeline"). Also corrected five deviant modestrings: * src/ui/widget/dock.cpp and src/ui/widget/dock.h: missing colon at the end * src/ui/dialog/tile.cpp: removed gratuitous second colon at the end * src/helper/units-test.h: removed gratuitous space before a colon * share/extensions/export_gimp_palette.py: missing textwidth=99 That's my geekiest commit yet. (bzr r9900) --- src/util/accumulators.h | 2 +- src/util/copy.h | 2 +- src/util/ege-tags.cpp | 2 +- src/util/ege-tags.h | 2 +- src/util/enums.h | 2 +- src/util/filter-list.h | 2 +- src/util/fixed_point.h | 2 +- src/util/format.h | 2 +- src/util/forward-pointer-iterator.h | 2 +- src/util/function.h | 2 +- src/util/glib-list-iterators.h | 2 +- src/util/list-container-test.h | 2 +- src/util/list-container.h | 2 +- src/util/list-copy.h | 2 +- src/util/list.h | 2 +- src/util/map-list.h | 2 +- src/util/mathfns.h | 2 +- src/util/reference.h | 2 +- src/util/reverse-list.h | 2 +- src/util/share.cpp | 2 +- src/util/share.h | 2 +- src/util/tuple.h | 2 +- src/util/units.cpp | 2 +- src/util/unordered-containers.h | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) (limited to 'src/util') diff --git a/src/util/accumulators.h b/src/util/accumulators.h index c627786b1..2cd51b101 100644 --- a/src/util/accumulators.h +++ b/src/util/accumulators.h @@ -110,4 +110,4 @@ struct LogicalOr { fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/copy.h b/src/util/copy.h index 27038ff2d..1b4232814 100644 --- a/src/util/copy.h +++ b/src/util/copy.h @@ -45,4 +45,4 @@ struct Copy { fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/ege-tags.cpp b/src/util/ege-tags.cpp index 5d33c85a3..8a2ce0529 100644 --- a/src/util/ege-tags.cpp +++ b/src/util/ege-tags.cpp @@ -175,4 +175,4 @@ void TagSet::decrement( std::string const& key ) fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/ege-tags.h b/src/util/ege-tags.h index eaba6a00a..7280e1f6a 100644 --- a/src/util/ege-tags.h +++ b/src/util/ege-tags.h @@ -118,4 +118,4 @@ private: fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/enums.h b/src/util/enums.h index cbb1cb9a1..824da3f75 100644 --- a/src/util/enums.h +++ b/src/util/enums.h @@ -130,4 +130,4 @@ private: fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/filter-list.h b/src/util/filter-list.h index 50aba12fa..cf086df4a 100644 --- a/src/util/filter-list.h +++ b/src/util/filter-list.h @@ -62,4 +62,4 @@ filter_list(UnaryPredicate p, List const &list) { fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/fixed_point.h b/src/util/fixed_point.h index 05a73dab5..cfc6e4020 100644 --- a/src/util/fixed_point.h +++ b/src/util/fixed_point.h @@ -108,4 +108,4 @@ template double operator *(double a, FixedPo fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/format.h b/src/util/format.h index 80d79c28a..690121254 100644 --- a/src/util/format.h +++ b/src/util/format.h @@ -53,4 +53,4 @@ inline ptr_shared format(char const *format, ...) { fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/forward-pointer-iterator.h b/src/util/forward-pointer-iterator.h index 1603fed27..198225d5f 100644 --- a/src/util/forward-pointer-iterator.h +++ b/src/util/forward-pointer-iterator.h @@ -117,4 +117,4 @@ public: fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/function.h b/src/util/function.h index d0dd5d87c..a7970f1c0 100644 --- a/src/util/function.h +++ b/src/util/function.h @@ -119,4 +119,4 @@ struct Function { fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/glib-list-iterators.h b/src/util/glib-list-iterators.h index 586bc314a..dfee69c07 100644 --- a/src/util/glib-list-iterators.h +++ b/src/util/glib-list-iterators.h @@ -235,4 +235,4 @@ private: fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/list-container-test.h b/src/util/list-container-test.h index 7765352eb..5f0e06e0c 100644 --- a/src/util/list-container-test.h +++ b/src/util/list-container-test.h @@ -246,4 +246,4 @@ public: fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/list-container.h b/src/util/list-container.h index ca614314c..e123fea0c 100644 --- a/src/util/list-container.h +++ b/src/util/list-container.h @@ -349,4 +349,4 @@ private: fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/list-copy.h b/src/util/list-copy.h index 811f93b77..28ce66ad3 100644 --- a/src/util/list-copy.h +++ b/src/util/list-copy.h @@ -42,4 +42,4 @@ struct ListCopy { fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/list.h b/src/util/list.h index ebe3a9773..e65aa849b 100644 --- a/src/util/list.h +++ b/src/util/list.h @@ -404,4 +404,4 @@ inline MutableList const &set_rest(MutableList const &list, fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/map-list.h b/src/util/map-list.h index 8eba81e3c..841a87a6d 100644 --- a/src/util/map-list.h +++ b/src/util/map-list.h @@ -65,4 +65,4 @@ map_list_in_place(UnaryFunction f, List start, fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/mathfns.h b/src/util/mathfns.h index e208ca93f..830e159da 100644 --- a/src/util/mathfns.h +++ b/src/util/mathfns.h @@ -80,4 +80,4 @@ inline double round_to_upper_multiple_plus(double x, double const c1, double con fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/reference.h b/src/util/reference.h index 199ae8929..5c94bbba5 100644 --- a/src/util/reference.h +++ b/src/util/reference.h @@ -46,4 +46,4 @@ struct Reference { fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/reverse-list.h b/src/util/reverse-list.h index 798b15701..dacbc2a11 100644 --- a/src/util/reverse-list.h +++ b/src/util/reverse-list.h @@ -65,4 +65,4 @@ reverse_list_in_place(MutableList start, fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/share.cpp b/src/util/share.cpp index 2f693fac9..606ed9d47 100644 --- a/src/util/share.cpp +++ b/src/util/share.cpp @@ -40,4 +40,4 @@ ptr_shared share_string(char const *string, std::size_t length) { fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/share.h b/src/util/share.h index 3a2b73561..4891b9588 100644 --- a/src/util/share.h +++ b/src/util/share.h @@ -145,4 +145,4 @@ inline ptr_shared reinterpret_cast_shared(ptr_shared const &ref) { fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/tuple.h b/src/util/tuple.h index 42266c8d2..1e4c4f62a 100644 --- a/src/util/tuple.h +++ b/src/util/tuple.h @@ -179,4 +179,4 @@ inline Tuple<> tuple() { return Tuple<>(); } fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/units.cpp b/src/util/units.cpp index c49b2176d..a251dc5db 100644 --- a/src/util/units.cpp +++ b/src/util/units.cpp @@ -341,4 +341,4 @@ void UnitsSAXHandler::_endElement(xmlChar const *xname) fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/util/unordered-containers.h b/src/util/unordered-containers.h index aaf771959..9411657a5 100644 --- a/src/util/unordered-containers.h +++ b/src/util/unordered-containers.h @@ -75,4 +75,4 @@ struct hash : public std::unary_function { fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : -- cgit v1.2.3