forked from teamnwah/openmw-tes3coop
Merge branch 'windowswarnings' of github.com:MichaelMcDonnell/openmw into windowswarnings
This commit is contained in:
commit
8cb4b1900b
1 changed files with 4 additions and 5 deletions
|
@ -1,7 +1,6 @@
|
||||||
// This program generates the file tables_gen.hpp
|
// This program generates the file tables_gen.hpp
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iomanip>
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
|
@ -10,9 +9,11 @@ using namespace std;
|
||||||
void tab() { cout << " "; }
|
void tab() { cout << " "; }
|
||||||
|
|
||||||
// write one number with a space in front of it and a comma after it
|
// write one number with a space in front of it and a comma after it
|
||||||
void num(unsigned char i, bool last)
|
void num(char i, bool last)
|
||||||
{
|
{
|
||||||
cout << " (char)0x" << (unsigned)i;
|
// Convert i to its integer value, i.e. -128 to 127. Printing it directly
|
||||||
|
// would result in non-printable characters in the source code, which is bad.
|
||||||
|
cout << " " << static_cast<int>(i);
|
||||||
if(!last) cout << ",";
|
if(!last) cout << ",";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,8 +81,6 @@ int write_table(const std::string &charset, const std::string &tableName)
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
cout << hex;
|
|
||||||
|
|
||||||
// Write header guard
|
// Write header guard
|
||||||
cout << "#ifndef COMPONENTS_TOUTF8_TABLE_GEN_H\n#define COMPONENTS_TOUTF8_TABLE_GEN_H\n\n";
|
cout << "#ifndef COMPONENTS_TOUTF8_TABLE_GEN_H\n#define COMPONENTS_TOUTF8_TABLE_GEN_H\n\n";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue