Guillaume Munch wrote:
> Le 14/06/2016 16:38, Jean-Marc Lasgouttes a écrit :
>
>> but of course RefChange<X>
>> proved more difficult. I tried to define it as a subclass of
>> unique_ptr<RevertibleRef<X>>, but then my C++11 default skills showed
>> their weakness.
>
> What errors does it give with the attached?
Only errors about constructor inheritance.
With the attached patch in addition it compiles fine & passes all tests. I
am not proposing to use the patch as-is, but it does not only make things
worse: It avoids to initialize members twice.
Georg
PS: If anyone running debian wants to test old compilers easily you can
simply install packages from older releases. For example, I used gcc-4.6,
g++-4.6 and corresponding dependencies from wheezy on a jessie system (the
packages do not interfere with the default compiler which is gcc 4.9). This
might work on ubuntu as well, but I did not try.
diff --git a/src/MetricsInfo.cpp b/src/MetricsInfo.cpp
index 5e10df1..e9821e3 100644
--- a/src/MetricsInfo.cpp
+++ b/src/MetricsInfo.cpp
@@ -58,11 +58,23 @@ MetricsBase::MetricsBase()
MetricsBase::MetricsBase(BufferView * b, FontInfo f, int w)
- : MetricsBase()
+ : bv(b), font(f), style(LM_ST_TEXT), fontname("mathnormal"), textwidth(w),
+ solid_line_thickness_(1), solid_line_offset_(1), dotted_line_thickness_(1)
{
- bv = b;
- font = f;
- textwidth = w;
+ if (lyxrc.zoom >= 200) {
+ // derive the line thickness from zoom factor
+ // the zoom is given in percent
+ // (increase thickness at 250%, 450% etc.)
+ solid_line_thickness_ = (lyxrc.zoom + 50) / 200;
+ // adjust line_offset_ too
+ solid_line_offset_ = 1 + solid_line_thickness_ / 2;
+ }
+ if (lyxrc.zoom >= 100) {
+ // derive the line thickness from zoom factor
+ // the zoom is given in percent
+ // (increase thickness at 150%, 250% etc.)
+ dotted_line_thickness_ = (lyxrc.zoom + 50) / 100;
+ }
}
diff --git a/src/mathed/MathStream.cpp b/src/mathed/MathStream.cpp
index e91db43..48a54ae 100644
--- a/src/mathed/MathStream.cpp
+++ b/src/mathed/MathStream.cpp
@@ -124,12 +124,11 @@ WriteStream & operator<<(WriteStream & ws, docstring const & s)
WriteStream::WriteStream(otexrowstream & os, bool fragile, bool latex,
OutputType output, Encoding const * encoding)
- : WriteStream(os)
+ : os_(os), fragile_(fragile), firstitem_(false), latex_(latex),
+ output_(output), pendingspace_(false), pendingbrace_(false),
+ textmode_(false), locked_(0), ascii_(0), canbreakline_(true),
+ line_(0), encoding_(encoding), row_entry_(TexRow::row_none)
{
- fragile_ = fragile;
- latex_ = latex;
- output_ = output;
- encoding_ = encoding;
}