[haiku-commits] Re: haiku: hrev47133 - src/apps/aboutsystem

  • From: Pawel Dziepak <pdziepak@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 19 Apr 2014 14:29:01 +0200

2014-04-19 14:25 GMT+02:00  <jessica.l.hamilton@xxxxxxxxx>:
> diff --git a/src/apps/aboutsystem/AboutSystem.cpp 
> b/src/apps/aboutsystem/AboutSystem.cpp
> index 3e6220f..5cf1558 100644
> --- a/src/apps/aboutsystem/AboutSystem.cpp
> +++ b/src/apps/aboutsystem/AboutSystem.cpp
> @@ -1760,7 +1760,7 @@ AboutView::_GetLicensePath(const char* license, BPath& 
> path)
>                 B_SYSTEM_NONPACKAGED_DATA_DIRECTORY,
>                 B_SYSTEM_DATA_DIRECTORY
>         };
> -       static const int dirCount = 3;
> +       static const int dirCount = 4;

Something like:

static const unsigned dirCount = sizeof(directoryConstants) /
sizeof(directoryConstants[0]);

would be a more future-proof solution.

Paweł

Other related posts: