pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-users] Bug 756458 pan 0.139 crashes on start


From: Rhialto
Subject: Re: [Pan-users] Bug 756458 pan 0.139 crashes on start
Date: Fri, 15 Jan 2016 14:45:25 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

On Thu 07 Jan 2016 at 18:53:53 +0100, Detlef Graef wrote:
> Maybe someone can tell me if the function "c_str()" from std::string can
> be simply replaced with "str" from StringView struct?
> 
> See line 72 here:
> 
> https://git.gnome.org/browse/pan2/tree/pan/general/string-view.h

I'd say so, yes. They both do (unsafe) access to the underlying
characters. If there is code where you replace std::strings with
StringViews (because of the rule not to put std::strings into
StringViews), then that would be an equivalent subsitution.

I agree with the remark earlier in the thread that lots of StringViews
ough to be replaced with std::string though, but that needs to be done
consistently so the previous rule isn't broken.

Maybe a first step to (temporarly, maybe) remove the constructor
StringView (const std::string& s) 
would be elucidating to find out how wide-spread the problem actually
is.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- The Doctor: No, 'eureka' is Greek for
\X/ rhialto/at/xs4all.nl    -- 'this bath is too hot.'

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]