mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +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>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): add formulamacro.C
|
||||
|
@ -19,9 +19,10 @@
|
||||
|
||||
using std::endl;
|
||||
using std::auto_ptr;
|
||||
using std::size_t;
|
||||
|
||||
|
||||
MathMacroArgument::MathMacroArgument(int n)
|
||||
MathMacroArgument::MathMacroArgument(size_t n)
|
||||
: number_(n)
|
||||
{
|
||||
if (n < 1 || n > 9) {
|
||||
|
@ -20,7 +20,7 @@
|
||||
class MathMacroArgument : public MathDimInset {
|
||||
public:
|
||||
///
|
||||
explicit MathMacroArgument(int);
|
||||
explicit MathMacroArgument(std::size_t);
|
||||
///
|
||||
std::auto_ptr<InsetBase> clone() const;
|
||||
///
|
||||
@ -28,7 +28,7 @@ public:
|
||||
///
|
||||
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; }
|
||||
|
||||
@ -39,7 +39,7 @@ public:
|
||||
|
||||
private:
|
||||
/// A number between 1 and 9
|
||||
int number_;
|
||||
std::size_t number_;
|
||||
///
|
||||
char str_[3];
|
||||
};
|
||||
|
@ -29,6 +29,7 @@ using std::map;
|
||||
using std::pair;
|
||||
using std::string;
|
||||
using std::vector;
|
||||
using std::size_t;
|
||||
|
||||
|
||||
MacroData::MacroData()
|
||||
@ -54,7 +55,7 @@ void MacroData::expand(vector<MathArray> const & args, MathArray & to) const
|
||||
continue;
|
||||
//it.cell().erase(it.pos());
|
||||
//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()) {
|
||||
it.cell().erase(it.pos());
|
||||
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.
|
||||
MacroTable & MacroTable::globalMacros()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user