[haiku-development] Re: Rename ControlLook constants, conflict

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Wed, 25 Oct 2017 11:56:09 -0700

On Wed, Oct 25, 2017 at 11:01 AM, looncraz <looncraz@xxxxxxxxxxxx> wrote:

On 10/25/2017 12:57, John Scipione wrote:

The enum is inside BControlLook. So, these constants are referred to as
BControlLook::B_LEFT_ARROW, etc. Thus they do not conflict with the ones
in InterfaceDefs and no renaming is needed.

That isn't how any other B_* constant works anywhere else in the
system, I don't see why we would make this the exception. B_ constants
are typically in the default namespace and are unique.

When I was going through the BControlLook code I found it odd.
BControlLook::LEFT_ARROW would make more sense, IMHO.

I looked and found that BPrintJob.h defines B_BW_PRINTER and
B_COLOR_PRINTER constants inside the BPrintJob class so there is some
precedence for putting B_ constants inside a class. I thought that
plan was to move the ControlLook enums out of the class before we made
it public, but, perhaps not. If that is not that plan we can safely
ignore my concerns and keep the constant names.

Other related posts: