diff options
Diffstat (limited to 'WebCore/platform/graphics/ImageBuffer.h')
-rw-r--r-- | WebCore/platform/graphics/ImageBuffer.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/WebCore/platform/graphics/ImageBuffer.h b/WebCore/platform/graphics/ImageBuffer.h index 14f7461..573e274 100644 --- a/WebCore/platform/graphics/ImageBuffer.h +++ b/WebCore/platform/graphics/ImageBuffer.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org> - * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,8 +32,8 @@ #include "IntSize.h" #include "ImageBufferData.h" #include <wtf/OwnPtr.h> +#include <wtf/PassOwnPtr.h> #include <wtf/PassRefPtr.h> -#include <memory> namespace WebCore { @@ -46,13 +46,13 @@ namespace WebCore { class ImageBuffer : Noncopyable { public: // Will return a null pointer on allocation failure. - static std::auto_ptr<ImageBuffer> create(const IntSize& size, bool grayScale) + static PassOwnPtr<ImageBuffer> create(const IntSize& size, bool grayScale) { bool success = false; - std::auto_ptr<ImageBuffer> buf(new ImageBuffer(size, grayScale, success)); + OwnPtr<ImageBuffer> buf(new ImageBuffer(size, grayScale, success)); if (success) - return buf; - return std::auto_ptr<ImageBuffer>(); + return buf.release(); + return 0; } ~ImageBuffer(); @@ -80,7 +80,7 @@ namespace WebCore { OwnPtr<GraphicsContext> m_context; mutable RefPtr<Image> m_image; - // This constructor will place its succes into the given out-variable + // This constructor will place its success into the given out-variable // so that create() knows when it should return failure. ImageBuffer(const IntSize&, bool grayScale, bool& success); }; |