Skip to content

Commit 9a8b9c5

Browse files
committed
Fixed license for new.cpp and small cosmetic changes
1 parent 37ee800 commit 9a8b9c5

File tree

2 files changed

+37
-9
lines changed

2 files changed

+37
-9
lines changed

Diff for: hardware/arduino/avr/cores/arduino/new.cpp

+20-6
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
1+
/*
2+
Copyright (c) 2014 Arduino. All right reserved.
3+
4+
This library is free software; you can redistribute it and/or
5+
modify it under the terms of the GNU Lesser General Public
6+
License as published by the Free Software Foundation; either
7+
version 2.1 of the License, or (at your option) any later version.
8+
9+
This library is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12+
See the GNU Lesser General Public License for more details.
13+
14+
You should have received a copy of the GNU Lesser General Public
15+
License along with this library; if not, write to the Free Software
16+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17+
*/
118

219
#include <stdlib.h>
320

421
void *operator new(size_t size) {
522
return malloc(size);
623
}
724

8-
void * operator new[](size_t size)
9-
{
25+
void *operator new[](size_t size) {
1026
return malloc(size);
1127
}
1228

13-
void operator delete(void * ptr)
14-
{
29+
void operator delete(void * ptr) {
1530
free(ptr);
1631
}
1732

18-
void operator delete[](void * ptr)
19-
{
33+
void operator delete[](void * ptr) {
2034
free(ptr);
2135
}
2236

Diff for: hardware/arduino/avr/cores/arduino/new.h

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
1-
/* Header to define new/delete operators as they aren't provided by avr-gcc by default
2-
Taken from http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=59453
3-
*/
1+
/*
2+
Copyright (c) 2014 Arduino. All right reserved.
3+
4+
This library is free software; you can redistribute it and/or
5+
modify it under the terms of the GNU Lesser General Public
6+
License as published by the Free Software Foundation; either
7+
version 2.1 of the License, or (at your option) any later version.
8+
9+
This library is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12+
See the GNU Lesser General Public License for more details.
13+
14+
You should have received a copy of the GNU Lesser General Public
15+
License along with this library; if not, write to the Free Software
16+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17+
*/
418

519
#ifndef NEW_H
620
#define NEW_H

0 commit comments

Comments
 (0)