Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赤子奈落
ygopro
Commits
314d9d3a
Commit
314d9d3a
authored
Jan 01, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't read CardString
parent
6b06968c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
gframe/data_manager.cpp
gframe/data_manager.cpp
+4
-2
No files found.
gframe/data_manager.cpp
View file @
314d9d3a
...
@@ -12,7 +12,7 @@ bool DataManager::LoadDB(const char* file) {
...
@@ -12,7 +12,7 @@ bool DataManager::LoadDB(const char* file) {
if
(
sqlite3_open
(
file
,
&
pDB
)
!=
SQLITE_OK
)
if
(
sqlite3_open
(
file
,
&
pDB
)
!=
SQLITE_OK
)
return
Error
(
pDB
);
return
Error
(
pDB
);
sqlite3_stmt
*
pStmt
;
sqlite3_stmt
*
pStmt
;
const
char
*
sql
=
"select * from datas
,texts where datas.id=texts.id
"
;
const
char
*
sql
=
"select * from datas"
;
if
(
sqlite3_prepare_v2
(
pDB
,
sql
,
-
1
,
&
pStmt
,
0
)
!=
SQLITE_OK
)
if
(
sqlite3_prepare_v2
(
pDB
,
sql
,
-
1
,
&
pStmt
,
0
)
!=
SQLITE_OK
)
return
Error
(
pDB
);
return
Error
(
pDB
);
CardDataC
cd
;
CardDataC
cd
;
...
@@ -39,7 +39,8 @@ bool DataManager::LoadDB(const char* file) {
...
@@ -39,7 +39,8 @@ bool DataManager::LoadDB(const char* file) {
cd
.
attribute
=
sqlite3_column_int
(
pStmt
,
9
);
cd
.
attribute
=
sqlite3_column_int
(
pStmt
,
9
);
cd
.
category
=
sqlite3_column_int
(
pStmt
,
10
);
cd
.
category
=
sqlite3_column_int
(
pStmt
,
10
);
_datas
.
insert
(
std
::
make_pair
(
cd
.
code
,
cd
));
_datas
.
insert
(
std
::
make_pair
(
cd
.
code
,
cd
));
len
=
BufferIO
::
DecodeUTF8
((
const
char
*
)
sqlite3_column_text
(
pStmt
,
12
),
strBuffer
);
/*
len = BufferIO::DecodeUTF8((const char*)sqlite3_column_text(pStmt, 12), strBuffer);
if(len) {
if(len) {
cs.name = new wchar_t[len + 1];
cs.name = new wchar_t[len + 1];
memcpy(cs.name, strBuffer, (len + 1)*sizeof(wchar_t));
memcpy(cs.name, strBuffer, (len + 1)*sizeof(wchar_t));
...
@@ -60,6 +61,7 @@ bool DataManager::LoadDB(const char* file) {
...
@@ -60,6 +61,7 @@ bool DataManager::LoadDB(const char* file) {
} else cs.desc[i - 14] = 0;
} else cs.desc[i - 14] = 0;
}
}
_strings.insert(std::make_pair(cd.code, cs));
_strings.insert(std::make_pair(cd.code, cs));
*/
}
}
}
while
(
step
!=
SQLITE_DONE
);
}
while
(
step
!=
SQLITE_DONE
);
sqlite3_finalize
(
pStmt
);
sqlite3_finalize
(
pStmt
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment