summaryrefslogtreecommitdiff
path: root/Source/Applications
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-11-25 18:42:44 +0100
committerAlexis211 <alexis211@gmail.com>2009-11-25 18:42:44 +0100
commita40fe1166ab1db972a8ca0380d603c4d90eede62 (patch)
treef92c2c02d9d78d68f7c116dff9ac508895f757af /Source/Applications
parentf367fe4e5a7712bafc121ce5c228f15e90fc5c93 (diff)
downloadMelon-a40fe1166ab1db972a8ca0380d603c4d90eede62.tar.gz
Melon-a40fe1166ab1db972a8ca0380d603c4d90eede62.zip
Re-organized file system stuff.
Diffstat (limited to 'Source/Applications')
-rw-r--r--Source/Applications/Demos/GOL.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Applications/Demos/GOL.cpp b/Source/Applications/Demos/GOL.cpp
index 32eb30a..298c73a 100644
--- a/Source/Applications/Demos/GOL.cpp
+++ b/Source/Applications/Demos/GOL.cpp
@@ -1,6 +1,7 @@
#include <Binding/VirtualTerminal.class.h>
#include <Binding/Thread.class.h>
#include <String.class.h>
+#include <ByteArray.class.h>
#include <Rand.ns.h>
int main(Vector<String> args) {
@@ -22,7 +23,7 @@ int main(Vector<String> args) {
}
}
- char *tmp = new char[w * h + 1];
+ ByteArray tmp((w + 1) * (h + 1));
bool run = true;
while (run) {
@@ -37,7 +38,7 @@ int main(Vector<String> args) {
}
}
outvt.moveCursor(0, 0);
- outvt << String(tmp, w*h) << "Press Ctrl+h for help";
+ outvt << tmp.toString() << "Press Ctrl+h for help";
//Compute next generation
for (int y = 0; y < h; y++) {