]> git.lyx.org Git - lyx.git/commitdiff
Fix gcc warning and be 64 bit clean.
authorAbdelrazak Younes <younes@lyx.org>
Mon, 14 May 2007 16:41:50 +0000 (16:41 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 14 May 2007 16:41:50 +0000 (16:41 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18312 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/ControlDocument.cpp
src/frontends/controllers/ControlDocument.h
src/frontends/qt4/QDocument.cpp
src/frontends/qt4/QDocument.h

index 701ff89cd98dd8b912d7d951ae5cc6f9d97bcb2e..7d5544d3392a401961a9f6e4570a6fc201c6dbc0 100644 (file)
@@ -79,9 +79,9 @@ BufferParams & ControlDocument::params() const
 }
 
 
-int ControlDocument::id() const
+BufferId ControlDocument::id() const
 {
-       return (int) &kernel().buffer();
+       return &kernel().buffer();
 }
 
 
index 03ff4eebe45ebb7f8887e1636ba33ff21e9cb4fb..71f7d01122075c9935840130694f5907cab6a3e1 100644 (file)
@@ -23,6 +23,9 @@ class TextClass;
 
 namespace frontend {
 
+///
+typedef void const * BufferId;
+
 /** A controller for Document dialogs.
  */
 class ControlDocument : public Dialog::Controller {
@@ -50,7 +53,7 @@ public:
        ///
        BufferParams & params() const;
        ///
-       int id() const;
+       BufferId id() const;
        ///
        void setLanguage() const;
        ///
index 0cf28596eaac3d2d4027305657d62f9b4014ec77..07bf99ca27571373f94cb6f12a6ac45c99fa2e42 100644 (file)
@@ -112,7 +112,7 @@ PreambleModule::PreambleModule(): current_id_(0)
 }
 
 
-void PreambleModule::update(BufferParams const & params, int id)
+void PreambleModule::update(BufferParams const & params, BufferId id)
 {
        QString preamble = toqstr(params.preamble);
        // Nothing to do if the params and preamble are unchanged.
index a44e6d35986beb3c1e4e06d63a386a95baeb5530..58a1754bc59e5a7515c8630fcf72d92faa9b0f28 100644 (file)
@@ -144,12 +144,15 @@ private:
 };
 
 
+typedef void const * BufferId;
+
+
 class PreambleModule : public UiWidget<Ui::PreambleUi>
 {
        Q_OBJECT
 public:
        PreambleModule();
-       void update(BufferParams const & params, int id);
+       void update(BufferParams const & params, BufferId id);
        void apply(BufferParams & params);
 
 Q_SIGNALS:
@@ -161,9 +164,9 @@ protected:
        void on_preambleTE_textChanged() { changed(); }
 
 private:
-       typedef std::map<int, std::pair<int,int> > Coords;
+       typedef std::map<BufferId, std::pair<int,int> > Coords;
        Coords preamble_coords_;
-       int current_id_;
+       BufferId current_id_;
 };