Re: [PATCH] Fix typo in Message.maildir_flags_to_tags
[notmuch-archives.git] / 6a / 1cc48ade3fea5cabd28e9368cdf8a9f3e13dd3
1 Return-Path: <tomi.ollila@iki.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 2FE71431FAF\r
6         for <notmuch@notmuchmail.org>; Fri,  2 Jan 2015 12:08:09 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id bpuvSRvRJSAi for <notmuch@notmuchmail.org>;\r
16         Fri,  2 Jan 2015 12:08:06 -0800 (PST)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id D1512431FAE\r
19         for <notmuch@notmuchmail.org>; Fri,  2 Jan 2015 12:08:05 -0800 (PST)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id BA780100051;\r
22         Fri,  2 Jan 2015 22:07:38 +0200 (EET)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH] lib: convert two "iterator copy strings" into references.\r
26 In-Reply-To: <1420215652-4131-1-git-send-email-david@tethera.net>\r
27 References: <1419763508-11902-1-git-send-email-david@tethera.net>\r
28         <1420215652-4131-1-git-send-email-david@tethera.net>\r
29 User-Agent: Notmuch/0.19+6~g8725b09 (http://notmuchmail.org) Emacs/24.3.1\r
30         (x86_64-unknown-linux-gnu)\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
32         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
33         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
34 Date: Fri, 02 Jan 2015 22:07:38 +0200\r
35 Message-ID: <m2vbkp0wvp.fsf@guru.guru-group.fi>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Fri, 02 Jan 2015 20:08:09 -0000\r
51 \r
52 On Fri, Jan 02 2015, David Bremner <david@tethera.net> wrote:\r
53 \r
54 > Apparently this is a supported and even idiomatic way of keeping a\r
55 > temporary object (e.g. like that returned from an operator\r
56 > dereference) alive.\r
57 > ---\r
58 \r
59 Based on internet search with words 'c++ reference to temporary' (*)\r
60 I believe the change is working one.\r
61 \r
62 Tomi\r
63 \r
64 (*) Uh, reading those explations gives me a headache >;)\r
65 \r
66 >\r
67 > I decided it was better to do both of these "keepalive" strings the\r
68 > same way, so I applied the parent patch as is.\r
69 >\r
70 >  lib/message.cc | 4 ++--\r
71 >  1 file changed, 2 insertions(+), 2 deletions(-)\r
72 >\r
73 > diff --git a/lib/message.cc b/lib/message.cc\r
74 > index bacb4d4..956a70a 100644\r
75 > --- a/lib/message.cc\r
76 > +++ b/lib/message.cc\r
77 > @@ -283,7 +283,7 @@ _notmuch_message_get_term (notmuch_message_t *message,\r
78 >      if (i == end)\r
79 >       return NULL;\r
80 >  \r
81 > -    std::string term = *i;\r
82 > +    const std::string &term = *i;\r
83 >      if (strncmp (term.c_str(), prefix, prefix_len))\r
84 >       return NULL;\r
85 >  \r
86 > @@ -641,7 +641,7 @@ _notmuch_message_add_directory_terms (void *ctx, notmuch_message_t *message)\r
87 >       unsigned int directory_id;\r
88 >       const char *direntry, *directory;\r
89 >       char *colon;\r
90 > -     const std::string term = *i;\r
91 > +     const std::string &term = *i;\r
92 >  \r
93 >       /* Terminate loop at first term without desired prefix. */\r
94 >       if (strncmp (term.c_str (), direntry_prefix, direntry_prefix_len))\r
95 > -- \r
96 > 2.1.3\r
97 >\r
98 > _______________________________________________\r
99 > notmuch mailing list\r
100 > notmuch@notmuchmail.org\r
101 > http://notmuchmail.org/mailman/listinfo/notmuch\r