mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
64 bit compile fixes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8525 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
aa3ddafe96
commit
120e59bc97
@ -1,3 +1,17 @@
|
||||
2004-03-24 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
64-bit compile fixes.
|
||||
|
||||
* errorlist.[Ch] (pos_start, pos_end): store as lyx::pos_type.
|
||||
(c-tor): pass lyx::pos_types rather than ints.
|
||||
|
||||
* paragraph.[Ch] (beginOfBody, begin_of_body_): return, store as
|
||||
lyx::pos_type.
|
||||
|
||||
* text.C (Delete): compile fix.
|
||||
(getPar): ensure that function declaration is the same as that in
|
||||
the header file.
|
||||
|
||||
2004-03-23 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* ispell.C (LaunchIspell):
|
||||
|
@ -12,13 +12,14 @@
|
||||
|
||||
#include "errorlist.h"
|
||||
|
||||
using lyx::pos_type;
|
||||
using std::string;
|
||||
|
||||
|
||||
ErrorItem::ErrorItem(string const & error, string const & description,
|
||||
int par_id, int pos_start, int pos_end)
|
||||
: error(error), description(description), par_id(par_id),
|
||||
pos_start(pos_start), pos_end(pos_end)
|
||||
ErrorItem::ErrorItem(string const & error_, string const & description_,
|
||||
int par_id_, pos_type pos_start_, pos_type pos_end_)
|
||||
: error(error_), description(description_), par_id(par_id_),
|
||||
pos_start(pos_start_), pos_end(pos_end_)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -12,6 +12,8 @@
|
||||
#ifndef ERRORLIST_H
|
||||
#define ERRORLIST_H
|
||||
|
||||
#include "support/types.h"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
@ -22,10 +24,10 @@ struct ErrorItem {
|
||||
std::string error;
|
||||
std::string description;
|
||||
int par_id;
|
||||
int pos_start;
|
||||
int pos_end;
|
||||
lyx::pos_type pos_start;
|
||||
lyx::pos_type pos_end;
|
||||
ErrorItem(std::string const & error, std::string const & description,
|
||||
int parid, int posstart, int posend);
|
||||
int parid, lyx::pos_type posstart, lyx::pos_type posend);
|
||||
ErrorItem();
|
||||
};
|
||||
|
||||
|
@ -1,3 +1,13 @@
|
||||
2004-03-24 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
64-bit compile fixes.
|
||||
|
||||
* ControlErrorList.C (goTo): use lyx::pos_type as type of
|
||||
temporary vars.
|
||||
|
||||
* ControlSpellchecker.C (nextWord): pass progress as a
|
||||
PosIterator::difference_type, not an int.
|
||||
|
||||
2004-03-17 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* ControlForks.[Ch]: removed.
|
||||
|
@ -68,9 +68,9 @@ void ControlErrorList::goTo(int item)
|
||||
return;
|
||||
}
|
||||
|
||||
int const end = std::min(err.pos_end, pit->size());
|
||||
int const start = std::min(err.pos_start, end);
|
||||
int const range = end - start;
|
||||
lyx::pos_type const end = std::min(err.pos_end, pit->size());
|
||||
lyx::pos_type const start = std::min(err.pos_start, end);
|
||||
lyx::pos_type const range = end - start;
|
||||
|
||||
// Now make the selection.
|
||||
PosIterator const pos(pit, start);
|
||||
|
@ -160,7 +160,8 @@ bool isLetter(PosIterator & cur)
|
||||
|
||||
|
||||
WordLangTuple nextWord(PosIterator & cur, PosIterator const & end,
|
||||
int & progress, BufferParams & bp)
|
||||
PosIterator::difference_type & progress,
|
||||
BufferParams & bp)
|
||||
{
|
||||
// skip until we have real text (will jump paragraphs)
|
||||
for (; cur != end && !isLetter(cur); ++cur, ++progress);
|
||||
|
@ -645,7 +645,7 @@ void Paragraph::applyLayout(LyXLayout_ptr const & new_layout)
|
||||
}
|
||||
|
||||
|
||||
int Paragraph::beginOfBody() const
|
||||
pos_type Paragraph::beginOfBody() const
|
||||
{
|
||||
return begin_of_body_;
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ public:
|
||||
/// the paragraph alongside the text of the rest of the paragraph
|
||||
/// (the body). This function returns the starting position of the
|
||||
/// body of the text in the paragraph.
|
||||
int beginOfBody() const;
|
||||
lyx::pos_type beginOfBody() const;
|
||||
/// recompute this value
|
||||
void setBeginOfBody();
|
||||
|
||||
@ -353,7 +353,7 @@ private:
|
||||
// for average tasks as buffer loading/switching etc.
|
||||
TextContainer text_;
|
||||
/// end of label
|
||||
int begin_of_body_;
|
||||
lyx::pos_type begin_of_body_;
|
||||
|
||||
struct Pimpl;
|
||||
///
|
||||
|
@ -1341,7 +1341,8 @@ void LyXText::Delete(LCursor & cur)
|
||||
CursorSlice sl = cur.top();
|
||||
cursorRight(cur);
|
||||
if (sl == cur.top()) {
|
||||
recordUndo(cur, Undo::DELETE, cur.par(), max(0, cur.par() - 1));
|
||||
recordUndo(cur, Undo::DELETE, cur.par(),
|
||||
max(par_type(0), cur.par() - 1));
|
||||
backspace(cur);
|
||||
}
|
||||
}
|
||||
@ -1442,7 +1443,7 @@ ParagraphList::iterator LyXText::getPar(CursorSlice const & cur) const
|
||||
}
|
||||
|
||||
|
||||
ParagraphList::iterator LyXText::getPar(int par) const
|
||||
ParagraphList::iterator LyXText::getPar(par_type par) const
|
||||
{
|
||||
//lyxerr << "getPar: " << par << " from " << paragraphs().size() << endl;
|
||||
BOOST_ASSERT(par >= 0);
|
||||
|
Loading…
Reference in New Issue
Block a user