[squid-dev] [PATCH] cleanup removal of needless get()

2016-09-30 Thread Amos Jeffries
The SSL code in particular contains a lot of calls to the get() on various Pointer objects from the general code. Now that C++11 gives our Pointer better boolean operators, and dereference oerators have been added. A bunch of these calls are not needing to be explicit. Remove them and use the

Re: [squid-dev] [PATCH] polish Config2 using C++11 features

2016-09-30 Thread Amos Jeffries
On 1/10/2016 6:10 a.m., Alex Rousskov wrote: > On 09/30/2016 10:58 AM, Amos Jeffries wrote: >> On 1/10/2016 5:09 a.m., Alex Rousskov wrote: >>> On 09/30/2016 09:38 AM, Amos Jeffries wrote: So I think we can start using these to replace old C-style initialization and clear() functions. >

Re: [squid-dev] [PATCH] polish Config2 using C++11 features

2016-09-30 Thread Amos Jeffries
On 1/10/2016 4:38 a.m., Amos Jeffries wrote: > We now seem to have had several patches successfully use members > declared with default values and/or with the "*this = Foo();" shortcut > for a reset/clear method. > > So I think we can start using these to replace old C-style > initialization and

[squid-dev] Build failed in Jenkins: trunk-full-matrix ยป clang,d-ubuntu-wily #239

2016-09-30 Thread noc
See -- [...truncated 6779 lines...] make[5]: Leaving directory

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-30 Thread Alex Rousskov
On 09/30/2016 10:37 AM, Amos Jeffries wrote: > Please make sure that your code debugs() dumps the full pfctl line(s) > received at level DBG_DATA, and (only) on errors the relevant bit at a > higher level like 2 or 3 - the other functions debug output can give This approach is outdated because

Re: [squid-dev] [PATCH] polish Config2 using C++11 features

2016-09-30 Thread Alex Rousskov
On 09/30/2016 10:58 AM, Amos Jeffries wrote: > On 1/10/2016 5:09 a.m., Alex Rousskov wrote: >> On 09/30/2016 09:38 AM, Amos Jeffries wrote: >>> So I think we can start using these to replace old C-style >>> initialization and clear() functions. >> Agreed. I wonder whether we should be consistent

Re: [squid-dev] [RFC] Support concurrent SBuf::c_str() calls

2016-09-30 Thread Alex Rousskov
On 09/29/2016 09:19 PM, Amos Jeffries wrote: > On 30/09/2016 5:03 a.m., Alex Rousskov wrote: >> Should we remove the increment to make concurrent c_str() calls safe? > The reason it exists remember is to prevent other SBuf sharing that > storage MemBuf from thinking they can append to the storage

Re: [squid-dev] [PATCH] polish Config2 using C++11 features

2016-09-30 Thread Amos Jeffries
On 1/10/2016 5:09 a.m., Alex Rousskov wrote: > On 09/30/2016 09:38 AM, Amos Jeffries wrote: >> We now seem to have had several patches successfully use members >> declared with default values and/or with the "*this = Foo();" shortcut >> for a reset/clear method. > > The *this assignment works for

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-30 Thread Amos Jeffries
On 1/10/2016 4:04 a.m., Shively, Gregory wrote: >> Must(false) just throws an exception. Where that exception will be >> caught before main() when thrown from your code, I do not know >> (perhaps you already do). Must(false) is just a trick to check >> whether all exceptions in your code will be

Re: [squid-dev] [PATCH] polish Config2 using C++11 features

2016-09-30 Thread Alex Rousskov
On 09/30/2016 09:38 AM, Amos Jeffries wrote: > We now seem to have had several patches successfully use members > declared with default values and/or with the "*this = Foo();" shortcut > for a reset/clear method. The *this assignment works for pre-C++11 v3.5 as well. The default values will not

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-30 Thread Alex Rousskov
On 09/30/2016 09:04 AM, Shively, Gregory wrote: > How about I get rid of the loop all together All other factors being equal, a single statement is better than a loop with a similar statement inside. > - I should be > only getting one line from pfctl, and if the parsing fails -I should >

[squid-dev] [PATCH] polish Config2 using C++11 features

2016-09-30 Thread Amos Jeffries
We now seem to have had several patches successfully use members declared with default values and/or with the "*this = Foo();" shortcut for a reset/clear method. So I think we can start using these to replace old C-style initialization and clear() functions. This patch begins by replacing the

Re: [squid-dev] [PATCH] OSX transparent-proxy using pfctl

2016-09-30 Thread Shively, Gregory
> Must(false) just throws an exception. Where that exception will be caught > before main() when thrown from your code, I do not know (perhaps you > already do). Must(false) is just a trick to check whether all exceptions in > your > code will be caught/handled the way you want. The alternative