summaryrefslogtreecommitdiffstats
path: root/o3d/core
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 08:56:27 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 08:56:27 +0000
commit55b4bbd40e6c06067fa5ad67db103bdd811b0883 (patch)
treec0a96b0771636b3e1f36a0d22480fd17cc775efe /o3d/core
parente943887937bbe90ba6f6788d128c93a4347d405d (diff)
downloadchromium_src-55b4bbd40e6c06067fa5ad67db103bdd811b0883.zip
chromium_src-55b4bbd40e6c06067fa5ad67db103bdd811b0883.tar.gz
chromium_src-55b4bbd40e6c06067fa5ad67db103bdd811b0883.tar.bz2
Fixes for gcc
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22597 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/core')
-rw-r--r--o3d/core/cross/image_utils.cc24
-rw-r--r--o3d/core/cross/image_utils.h2
2 files changed, 14 insertions, 12 deletions
diff --git a/o3d/core/cross/image_utils.cc b/o3d/core/cross/image_utils.cc
index 09ddf75..a9d4112 100644
--- a/o3d/core/cross/image_utils.cc
+++ b/o3d/core/cross/image_utils.cc
@@ -661,18 +661,22 @@ ImageFileType GetFileTypeFromFilename(const char *filename) {
}
}
-ImageFileType GetFileTypeFromMimeType(const char *mime_type) {
- struct MimeTypeToFileType {
- const char *mime_type;
- ImageFileType file_type;
- };
+namespace {
+
+struct MimeTypeToFileType {
+ const char *mime_type;
+ ImageFileType file_type;
+};
- static const MimeTypeToFileType mime_type_map[] = {
- {"image/png", PNG},
- {"image/jpeg", JPEG},
- // No official MIME type for TGA or DDS.
- };
+const MimeTypeToFileType mime_type_map[] = {
+ {"image/png", PNG},
+ {"image/jpeg", JPEG},
+ // No official MIME type for TGA or DDS.
+};
+} // anonymous namespace
+
+ImageFileType GetFileTypeFromMimeType(const char *mime_type) {
for (unsigned int i = 0u; i < arraysize(mime_type_map); ++i) {
if (!strcmp(mime_type, mime_type_map[i].mime_type))
return mime_type_map[i].file_type;
diff --git a/o3d/core/cross/image_utils.h b/o3d/core/cross/image_utils.h
index 0ebecb6..12f29b8 100644
--- a/o3d/core/cross/image_utils.h
+++ b/o3d/core/cross/image_utils.h
@@ -34,8 +34,6 @@
#ifndef O3D_CORE_CROSS_IMAGE_UTILS_H_
#define O3D_CORE_CROSS_IMAGE_UTILS_H_
-#include "core/cross/precompile.h"
-
#include "base/cross/bits.h"
#include "core/cross/types.h"
#include "core/cross/texture_base.h"