The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit 249d96ed942ca92b056c404fbcfee9ca00bd8d2e
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Mon May 6 22:50:26 2013 +0200

    Small clanup (just move functions around)

diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index 9b4ea3f..36b663e 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -121,23 +121,6 @@ int findBackwards(DocIterator & cur, MatchString const & 
match,
 }
 
 
-bool findChange(DocIterator & cur, bool next)
-{
-       if (!next)
-               cur.backwardPos();
-       for (; cur; next ? cur.forwardPos() : cur.backwardPos())
-               if (cur.inTexted() && cur.paragraph().isChanged(cur.pos())) {
-                       if (!next)
-                               // if we search backwards, take a step forward
-                               // to correctly set the anchor
-                               cur.forwardPos();
-                       return true;
-               }
-
-       return false;
-}
-
-
 bool searchAllowed(docstring const & str)
 {
        if (str.empty()) {
@@ -404,15 +387,21 @@ bool lyxreplace(BufferView * bv,
 }
 
 
-bool findNextChange(BufferView * bv)
+namespace {
+bool findChange(DocIterator & cur, bool next)
 {
-       return findChange(bv, true);
-}
-
+       if (!next)
+               cur.backwardPos();
+       for (; cur; next ? cur.forwardPos() : cur.backwardPos())
+               if (cur.inTexted() && cur.paragraph().isChanged(cur.pos())) {
+                       if (!next)
+                               // if we search backwards, take a step forward
+                               // to correctly set the anchor
+                               cur.forwardPos();
+                       return true;
+               }
 
-bool findPreviousChange(BufferView * bv)
-{
-       return findChange(bv, false);
+       return false;
 }
 
 
@@ -483,6 +472,20 @@ bool findChange(BufferView * bv, bool next)
 
        return true;
 }
+}
+
+
+bool findNextChange(BufferView * bv)
+{
+       return findChange(bv, true);
+}
+
+
+bool findPreviousChange(BufferView * bv)
+{
+       return findChange(bv, false);
+}
+
 
 namespace {
 
diff --git a/src/lyxfind.h b/src/lyxfind.h
index 589a5d0..9adcae9 100644
--- a/src/lyxfind.h
+++ b/src/lyxfind.h
@@ -72,10 +72,6 @@ bool findNextChange(BufferView * bv);
 /// find the previous change in the buffer
 bool findPreviousChange(BufferView * bv);
 
-/// find the change in the buffer
-/// \param next true to find the next change, otherwise the previous
-bool findChange(BufferView * bv, bool next);
-
 class FindAndReplaceOptions {
 public:
        typedef enum {

-----------------------------------------------------------------------

Summary of changes:
 src/lyxfind.cpp |   51 +++++++++++++++++++++++++++------------------------
 src/lyxfind.h   |    4 ----
 2 files changed, 27 insertions(+), 28 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to