summaryrefslogtreecommitdiffstats
path: root/base/stats_table.cc
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-10 00:16:28 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-10 00:16:28 +0000
commit11b901ee17f1ef5aa41c70046b7a5360534c633d (patch)
tree9dd5ca2b4ec4864658218126afc2f813a2c32c68 /base/stats_table.cc
parent64f5c3c6952e4861a269dd8e0d396ecea584ffa1 (diff)
downloadchromium_src-11b901ee17f1ef5aa41c70046b7a5360534c633d.zip
chromium_src-11b901ee17f1ef5aa41c70046b7a5360534c633d.tar.gz
chromium_src-11b901ee17f1ef5aa41c70046b7a5360534c633d.tar.bz2
Use gcc 4.2 for the Mac build. Fix up new warnings and errors pointed out
by gcc 4.2: warning: 'C' has a field 'C::m_' whose type uses the anonymous namespace warning: missing braces around initializer for 'S' error: extra qualification 'C::' on member 'm' Review URL: http://codereview.chromium.org/1675 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1955 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/stats_table.cc')
-rw-r--r--base/stats_table.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/base/stats_table.cc b/base/stats_table.cc
index ba08f1c..14e4a89 100644
--- a/base/stats_table.cc
+++ b/base/stats_table.cc
@@ -70,14 +70,6 @@ const int kTableVersion = 0x13131313;
// The name for un-named counters and threads in the table.
const wchar_t kUnknownName[] = L"<unknown>";
-// Various header information contained in the memory mapped segment.
-struct TableHeader {
- int version;
- int size;
- int max_counters;
- int max_threads;
-};
-
// Calculates delta to align an offset to the size of an int
inline int AlignOffset(int offset) {
return (sizeof(int) - (offset % sizeof(int))) % sizeof(int);
@@ -115,6 +107,14 @@ static void SlotReturnFunction(void* data) {
// clean and accessible.
class StatsTablePrivate {
public:
+ // Various header information contained in the memory mapped segment.
+ struct TableHeader {
+ int version;
+ int size;
+ int max_counters;
+ int max_threads;
+ };
+
// Create the StatsTablePrivate based on expected size parameters.
StatsTablePrivate(void* memory, int size, int max_threads, int max_counters);
@@ -231,7 +231,7 @@ StatsTable::StatsTable(const std::wstring& name, int max_threads,
int max_counters)
: tls_index_(SlotReturnFunction) {
int table_size =
- AlignedSize(sizeof(TableHeader)) +
+ AlignedSize(sizeof(StatsTablePrivate::TableHeader)) +
AlignedSize((max_counters * sizeof(wchar_t) * kMaxCounterNameLength)) +
AlignedSize((max_threads * sizeof(wchar_t) * kMaxThreadNameLength)) +
AlignedSize(max_threads * sizeof(int)) +