Skip to content

Commit 9591fcd

Browse files
committed
Progresso on CPP Lib
1 parent 8dd1b74 commit 9591fcd

2 files changed

Lines changed: 32 additions & 3 deletions

File tree

cpp/.project

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>libjpak</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10+
<triggers>clean,full,incremental,</triggers>
11+
<arguments>
12+
</arguments>
13+
</buildCommand>
14+
<buildCommand>
15+
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
16+
<triggers>full,incremental,</triggers>
17+
<arguments>
18+
</arguments>
19+
</buildCommand>
20+
</buildSpec>
21+
<natures>
22+
<nature>org.eclipse.cdt.core.cnature</nature>
23+
<nature>org.eclipse.cdt.core.ccnature</nature>
24+
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
25+
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
26+
</natures>
27+
</projectDescription>

cpp/JPAK.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
#include "JPAK.h"
99

1010
JPAK::JPAK() {
11-
// TODO Auto-generated constructor stub
12-
11+
ready = false;
1312
}
1413

1514
JPAK::~JPAK() {
16-
// TODO Auto-generated destructor stub
15+
if(jpakfile.is_open())
16+
jpakfile.close();
17+
root.clear();
1718
}
1819
bool JPAK::ProcessTable(string &table) {
1920
return reader.parse(table.c_str(), root);
@@ -34,6 +35,7 @@ bool JPAK::LoadFromFile(string &filename) {
3435
char table[fsize-tableoffset-4];
3536
jpakfile.read(table, fsize-tableoffset-4);
3637
string table_s = table;
38+
jpakfile.seekg(0,ios_base::beg);
3739
if(ProcessTable(table_s)) {
3840
ready = true;
3941
return false;

0 commit comments

Comments
 (0)