Fix permissive C++ for GCC 3.4+:

- move an inline constructor outside of the class, since the friend
  is not fully declared yet.
- template references.
- missing include to get full declaration of a class.
This commit is contained in:
joerg 2006-09-19 23:35:07 +00:00
parent 709547d2e9
commit 368333a688
5 changed files with 121 additions and 1 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.6 2005/02/24 12:51:41 agc Exp $
$NetBSD: distinfo,v 1.7 2006/09/19 23:35:07 joerg Exp $
SHA1 (lyx-1.2.0.tar.gz) = 56db850f316c18e00c4b10946216b6eb25107dab
RMD160 (lyx-1.2.0.tar.gz) = e21eeb53517bf994938f2d89e7be585da9ff8cd3
@ -16,3 +16,7 @@ SHA1 (patch-ag) = b1f3e8e12d667f2761206bcd4d9d0d5c450fac09
SHA1 (patch-ah) = 100b2b3d4f823a472e7c69dbd3130c830a1a6cba
SHA1 (patch-ai) = 3e694cf156a527bba9155de49c3a6a9fb66af014
SHA1 (patch-aj) = 8a8e5750fe67093e748791da7b11141fcf3a0795
SHA1 (patch-ak) = 473918c84edff55d68dc193b8eb1f07b78abbca5
SHA1 (patch-al) = a441f0925619fcc674d83c24e90d041047a71ad7
SHA1 (patch-am) = dd8f9061b476c5c71f7a4b1ee478df4369caf510
SHA1 (patch-an) = b39ef6b367a1e47e072d48181aa29a0b8cbcec13

View file

@ -0,0 +1,24 @@
$NetBSD: patch-ak,v 1.1 2006/09/19 23:35:07 joerg Exp $
--- src/graphics/GraphicsConverter.h.orig 2006-09-20 00:55:27.000000000 +0000
+++ src/graphics/GraphicsConverter.h
@@ -60,7 +60,7 @@ private:
/** Make the c-tor private so we can control how many objects
* are instantiated.
*/
- GConverter() {}
+ GConverter();
/** Build the conversion script, returning true if able to build it.
* The script is output to the ostringstream 'script'.
@@ -117,6 +117,10 @@ struct ConvProcess : public SigC::Object
SignalTypePtr on_finish_;
};
+inline GConverter::GConverter()
+{
+}
+
} // namespace grfx
#endif // GRAPHICSCONVERTER_H

View file

@ -0,0 +1,67 @@
$NetBSD: patch-al,v 1.1 2006/09/19 23:35:07 joerg Exp $
--- src/frontends/controllers/ControlDialog.tmpl.orig 2006-09-20 01:06:59.000000000 +0000
+++ src/frontends/controllers/ControlDialog.tmpl
@@ -27,49 +27,49 @@ ControlDialog<Base>::ControlDialog(LyXVi
template <class Base>
void ControlDialog<Base>::show()
{
- if (isBufferDependent() && !lv_.view()->available())
+ if (this->isBufferDependent() && !this->lv_.view()->available())
return;
- connect();
+ this->connect();
setParams();
- if (emergency_exit_) {
+ if (this->emergency_exit_) {
hide();
return;
}
if (!dialog_built_) {
- view().build();
+ this->view().build();
dialog_built_ = true;
}
- bc().readOnly(isReadonly());
- view().show();
+ this->bc().readOnly(this->isReadonly());
+ this->view().show();
}
template <class Base>
void ControlDialog<Base>::update()
{
- if (isBufferDependent() && !lv_.view()->available())
+ if (this->isBufferDependent() && !this->lv_.view()->available())
return;
setParams();
- if (emergency_exit_) {
+ if (this->emergency_exit_) {
hide();
return;
}
- bc().readOnly(isReadonly());
- view().update();
+ this->bc().readOnly(this->isReadonly());
+ this->view().update();
}
template <class Base>
void ControlDialog<Base>::hide()
{
- emergency_exit_ = false;
+ this->emergency_exit_ = false;
clearParams();
- disconnect();
- view().hide();
+ this->disconnect();
+ this->view().hide();
}

View file

@ -0,0 +1,12 @@
$NetBSD: patch-am,v 1.1 2006/09/19 23:35:07 joerg Exp $
--- src/frontends/controllers/ControlInset.tmpl.orig 2006-09-20 01:05:11.000000000 +0000
+++ src/frontends/controllers/ControlInset.tmpl
@@ -10,6 +10,7 @@
* instantiated if this file is #included in the derived classes' .C file.
*/
+#include "LyXView.h"
#include "ControlInset.h"
#include "support/LAssert.h"
#include "debug.h"

View file

@ -0,0 +1,13 @@
$NetBSD: patch-an,v 1.1 2006/09/19 23:35:07 joerg Exp $
--- src/frontends/xforms/FormBase.h.orig 2006-09-20 01:13:31.000000000 +0000
+++ src/frontends/xforms/FormBase.h
@@ -133,7 +133,7 @@ FormCB<Controller, Base>::FormCB(Control
template <class Controller, class Base>
Controller & FormCB<Controller, Base>::controller() const
{
- return static_cast<Controller &>(controller_);
+ return static_cast<Controller &>(this->controller_);
//return dynamic_cast<Controller &>(controller_);
}