public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [Bitcoin-development] Fwd: bitcoin scope issue in main.cpp
       [not found] ` <CA+s+GJBo90gH4pRx7+vnHgy5y6bWF7My69jNj6J-RHw7bBqH8g@mail.gmail.com>
@ 2011-10-23  9:56   ` John Smith
  2011-10-23 20:51     ` theymos
  0 siblings, 1 reply; 5+ messages in thread
From: John Smith @ 2011-10-23  9:56 UTC (permalink / raw)
  To: Bitcoin Dev

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]

FYI
It's in a disabled feature (replacement), so I'm not sure how important this
is, but it doesn't look good.

---------- Forwarded message ----------
From: Dean Gores <dmgores@gmail.com>
Date: Sun, Oct 23, 2011 at 11:15 AM
Subject: bitcoin scope issue in main.cpp
To: laanwj@gmail.com


You have "i" and "output" declared in the same scope in "main.cpp",
AcceptToMemoryPool.  Below is the offending code.

           for (int i = 0; i < vin.size(); i++)
           {
               COutPoint outpoint = vin[i].prevout;
               if (!mapNextTx.count(outpoint) ||
mapNextTx[outpoint].ptx != ptxOld)
                   return false;
           }


Cheers,
Dean Gores

[-- Attachment #2: Type: text/html, Size: 1102 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bitcoin-development] Fwd: bitcoin scope issue in main.cpp
  2011-10-23  9:56   ` [Bitcoin-development] Fwd: bitcoin scope issue in main.cpp John Smith
@ 2011-10-23 20:51     ` theymos
  2011-10-24  5:02       ` John Smith
  0 siblings, 1 reply; 5+ messages in thread
From: theymos @ 2011-10-23 20:51 UTC (permalink / raw)
  To: bitcoin-development

It's legal for a scope to define variables with names that conflict with
the names of variables in higher-level scopes.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bitcoin-development] Fwd: bitcoin scope issue in main.cpp
  2011-10-23 20:51     ` theymos
@ 2011-10-24  5:02       ` John Smith
  2011-10-24 14:31         ` Amir Taaki
  0 siblings, 1 reply; 5+ messages in thread
From: John Smith @ 2011-10-24  5:02 UTC (permalink / raw)
  To: theymos; +Cc: bitcoin-development

[-- Attachment #1: Type: text/plain, Size: 968 bytes --]

Yes, I know that. It compiles.

If we pulled all the 'This is legal in C++' tricks in the bitcoin source it
would be even less maintainable and readable than now. But whatever...

JS

On Sun, Oct 23, 2011 at 10:51 PM, theymos <theymos@mm.st> wrote:

> It's legal for a scope to define variables with names that conflict with
> the names of variables in higher-level scopes.
>
>
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Cisco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>

[-- Attachment #2: Type: text/html, Size: 1467 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bitcoin-development] Fwd: bitcoin scope issue in main.cpp
  2011-10-24  5:02       ` John Smith
@ 2011-10-24 14:31         ` Amir Taaki
  2011-10-24 18:11           ` John Smith
  0 siblings, 1 reply; 5+ messages in thread
From: Amir Taaki @ 2011-10-24 14:31 UTC (permalink / raw)
  To: bitcoin-development

[-- Attachment #1: Type: text/plain, Size: 2002 bytes --]

Hahaha you mean like unitialised variables, inheriting from containers with non-virtual dtors (CScript) and delicious copy pasta coding (PushMessage, bignum and serialize stuff).


No need to worry about that :)



________________________________
From: John Smith <witchspace81@gmail.com>
To: theymos <theymos@mm.st>
Cc: bitcoin-development@lists.sourceforge.net
Sent: Monday, October 24, 2011 6:02 AM
Subject: Re: [Bitcoin-development] Fwd: bitcoin scope issue in main.cpp



Yes, I know that. It compiles.

If we pulled all the 'This is legal in C++' tricks in the bitcoin source it would be even less maintainable and readable than now. But whatever...

JS


On Sun, Oct 23, 2011 at 10:51 PM, theymos <theymos@mm.st> wrote:

It's legal for a scope to define variables with names that conflict with
>the names of variables in higher-level scopes.
>
>------------------------------------------------------------------------------
>The demand for IT networking professionals continues to grow, and the
>demand for specialized networking skills is growing even more rapidly.
>Take a complimentary Learning@Cisco Self-Assessment and learn
>about Cisco certifications, training, and career opportunities.
>http://p.sf.net/sfu/cisco-dev2dev
>_______________________________________________
>Bitcoin-development mailing list
>Bitcoin-development@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Bitcoin-development mailing list
Bitcoin-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitcoin-development

[-- Attachment #2: Type: text/html, Size: 3769 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bitcoin-development] Fwd: bitcoin scope issue in main.cpp
  2011-10-24 14:31         ` Amir Taaki
@ 2011-10-24 18:11           ` John Smith
  0 siblings, 0 replies; 5+ messages in thread
From: John Smith @ 2011-10-24 18:11 UTC (permalink / raw)
  To: Amir Taaki; +Cc: bitcoin-development

[-- Attachment #1: Type: text/plain, Size: 2839 bytes --]

Yes, you're right, there is a lot of code is in the "fun with knives"
category.

JS

On Mon, Oct 24, 2011 at 4:31 PM, Amir Taaki <zgenjix@yahoo.com> wrote:

> Hahaha you mean like unitialised variables, inheriting from containers with
> non-virtual dtors (CScript) and delicious copy pasta coding (PushMessage,
> bignum and serialize stuff).
>
> No need to worry about that :)
>
> ------------------------------
> *From:* John Smith <witchspace81@gmail.com>
> *To:* theymos <theymos@mm.st>
> *Cc:* bitcoin-development@lists.sourceforge.net
> *Sent:* Monday, October 24, 2011 6:02 AM
> *Subject:* Re: [Bitcoin-development] Fwd: bitcoin scope issue in main.cpp
>
>
> Yes, I know that. It compiles.
>
> If we pulled all the 'This is legal in C++' tricks in the bitcoin source it
> would be even less maintainable and readable than now. But whatever...
>
> JS
>
> On Sun, Oct 23, 2011 at 10:51 PM, theymos <theymos@mm.st> wrote:
>
> It's legal for a scope to define variables with names that conflict with
> the names of variables in higher-level scopes.
>
>
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Cisco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
>
>
>
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Cisco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
>
>
>
> ------------------------------------------------------------------------------
> The demand for IT networking professionals continues to grow, and the
> demand for specialized networking skills is growing even more rapidly.
> Take a complimentary Learning@Cisco Self-Assessment and learn
> about Cisco certifications, training, and career opportunities.
> http://p.sf.net/sfu/cisco-dev2dev
> _______________________________________________
> Bitcoin-development mailing list
> Bitcoin-development@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bitcoin-development
>
>

[-- Attachment #2: Type: text/html, Size: 5009 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-10-24 18:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAMm66_=eqw9VqYrs5kv_i1di1FmDtP8X1dgBH90N0CuVvZswMA@mail.gmail.com>
     [not found] ` <CA+s+GJBo90gH4pRx7+vnHgy5y6bWF7My69jNj6J-RHw7bBqH8g@mail.gmail.com>
2011-10-23  9:56   ` [Bitcoin-development] Fwd: bitcoin scope issue in main.cpp John Smith
2011-10-23 20:51     ` theymos
2011-10-24  5:02       ` John Smith
2011-10-24 14:31         ` Amir Taaki
2011-10-24 18:11           ` John Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox