Subversion Repositories Filer-Free

Rev

Rev 11 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11 Rev 64
Line 1... Line 1...
1
// This file is part of the free Filer module for RISC OS.
1
// This file is part of the free Filer module for RISC OS.
2
// Copyright © 2007 Graham Shaw.
2
// Copyright © 2007 Graham Shaw.
3
// Redistribution and modification are permitted under the terms of the
3
// Redistribution and modification are permitted under the terms of the
4
// GNU General Public License (version 2 or any later version).
4
// GNU General Public License (version 2 or any later version).
5
 
5
 
-
 
6
#include <new>
-
 
7
 
6
#include "auto_buffer.h"
8
#include "auto_buffer.h"
7
 
9
 
8
auto_buffer::auto_buffer(size_type size):
10
auto_buffer::auto_buffer(size_type size):
9
        _buffer(new char[size])
11
        _buffer(new(std::nothrow) char[size])
10
{}
12
{}
11
 
13
 
12
auto_buffer& auto_buffer::operator=(auto_buffer& buffer)
14
auto_buffer& auto_buffer::operator=(auto_buffer& buffer)
13
{
15
{
14
        if (buffer._buffer!=_buffer)
16
        if (buffer._buffer!=_buffer)