mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
use size_t instead of int to avoid a singed/unsigned warning
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8848 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
835a0d9186
commit
5b60445aae
@ -1,3 +1,12 @@
|
|||||||
|
2004-07-24 Lars Gullik Bjonnes <larsbj@gullik.net>
|
||||||
|
|
||||||
|
* math_macrotable.C (expand): n is now size_t
|
||||||
|
|
||||||
|
* math_macroarg.h (number): return size_t
|
||||||
|
(number_): make it a size_t
|
||||||
|
|
||||||
|
* math_macroarg.[Ch] (MathMacroArgument): take size_t as arg
|
||||||
|
|
||||||
2004-05-28 Lars Gullik Bjonnes <larsbj@gullik.net>
|
2004-05-28 Lars Gullik Bjonnes <larsbj@gullik.net>
|
||||||
|
|
||||||
* Makefile.am (EXTRA_DIST): add formulamacro.C
|
* Makefile.am (EXTRA_DIST): add formulamacro.C
|
||||||
|
@ -19,9 +19,10 @@
|
|||||||
|
|
||||||
using std::endl;
|
using std::endl;
|
||||||
using std::auto_ptr;
|
using std::auto_ptr;
|
||||||
|
using std::size_t;
|
||||||
|
|
||||||
|
|
||||||
MathMacroArgument::MathMacroArgument(int n)
|
MathMacroArgument::MathMacroArgument(size_t n)
|
||||||
: number_(n)
|
: number_(n)
|
||||||
{
|
{
|
||||||
if (n < 1 || n > 9) {
|
if (n < 1 || n > 9) {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
class MathMacroArgument : public MathDimInset {
|
class MathMacroArgument : public MathDimInset {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
explicit MathMacroArgument(int);
|
explicit MathMacroArgument(std::size_t);
|
||||||
///
|
///
|
||||||
std::auto_ptr<InsetBase> clone() const;
|
std::auto_ptr<InsetBase> clone() const;
|
||||||
///
|
///
|
||||||
@ -28,7 +28,7 @@ public:
|
|||||||
///
|
///
|
||||||
void draw(PainterInfo &, int x, int y) const;
|
void draw(PainterInfo &, int x, int y) const;
|
||||||
///
|
///
|
||||||
int number() const { return number_; }
|
std::size_t number() const { return number_; }
|
||||||
///
|
///
|
||||||
InsetBase::Code lyxCode() const { return MATHMACROARG_CODE; }
|
InsetBase::Code lyxCode() const { return MATHMACROARG_CODE; }
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
/// A number between 1 and 9
|
/// A number between 1 and 9
|
||||||
int number_;
|
std::size_t number_;
|
||||||
///
|
///
|
||||||
char str_[3];
|
char str_[3];
|
||||||
};
|
};
|
||||||
|
@ -29,6 +29,7 @@ using std::map;
|
|||||||
using std::pair;
|
using std::pair;
|
||||||
using std::string;
|
using std::string;
|
||||||
using std::vector;
|
using std::vector;
|
||||||
|
using std::size_t;
|
||||||
|
|
||||||
|
|
||||||
MacroData::MacroData()
|
MacroData::MacroData()
|
||||||
@ -54,7 +55,7 @@ void MacroData::expand(vector<MathArray> const & args, MathArray & to) const
|
|||||||
continue;
|
continue;
|
||||||
//it.cell().erase(it.pos());
|
//it.cell().erase(it.pos());
|
||||||
//it.cell().insert(it.pos(), it.nextInset()->asMathInset()
|
//it.cell().insert(it.pos(), it.nextInset()->asMathInset()
|
||||||
int n = static_cast<MathMacroArgument*>(it.nextInset())->number();
|
size_t n = static_cast<MathMacroArgument*>(it.nextInset())->number();
|
||||||
if (n <= args.size()) {
|
if (n <= args.size()) {
|
||||||
it.cell().erase(it.pos());
|
it.cell().erase(it.pos());
|
||||||
it.cell().insert(it.pos(), args[n - 1]);
|
it.cell().insert(it.pos(), args[n - 1]);
|
||||||
@ -65,7 +66,6 @@ void MacroData::expand(vector<MathArray> const & args, MathArray & to) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// The global table.
|
// The global table.
|
||||||
MacroTable & MacroTable::globalMacros()
|
MacroTable & MacroTable::globalMacros()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user