On Thu, Mar 03, 2016 at 10:45:59PM +0100, Enrico Forestieri wrote:

> On Wed, Mar 02, 2016 at 11:50:01PM +0100, Jean-Marc Lasgouttes wrote:
> 
> > Le 28/02/2016 21:32, Uwe Stöhr a écrit :
> > >I recompiled LyX completely and get now this warning:
> > >
> > >ParagraphMetrics.cpp
> > >D:\LyXGit\Master\src\ParagraphMetrics.cpp(108): warning C4838:
> > >conversion from 'const int' to 'const lyx::char_type' requires a
> > >narrowing conversion
> > 
> > I think the following patch fixes the issue.
> 
> Nope.

The attached patch does the trick for me.

-- 
Enrico
diff --git a/src/ParagraphMetrics.cpp b/src/ParagraphMetrics.cpp
index ad217cf..4a06e15 100644
--- a/src/ParagraphMetrics.cpp
+++ b/src/ParagraphMetrics.cpp
@@ -105,7 +105,9 @@ size_t ParagraphMetrics::computeRowSignature(Row const & 
row,
                                static_cast<char_type>(row.sel_end),
                                row.begin_margin_sel,
                                row.end_margin_sel,
-                               d.wid, d.asc, d.des };
+                               static_cast<char_type>(d.wid),
+                               static_cast<char_type>(d.asc),
+                               static_cast<char_type>(d.des) };
        crc.process_bytes(b, sizeof(b));
        crc.process_bytes(&row.separator, sizeof(row.separator));
 

Reply via email to