mirror of
https://github.com/aimrebirth/tools.git
synced 2026-04-15 01:43:25 +00:00
Use exceptions in default case.
This commit is contained in:
parent
fd543790dd
commit
36f5234afb
1 changed files with 5 additions and 4 deletions
|
|
@ -21,6 +21,8 @@
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#include <primitives/exceptions.h>
|
||||||
|
|
||||||
std::string getSqlType(FieldType type)
|
std::string getSqlType(FieldType type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
|
|
@ -32,9 +34,8 @@ std::string getSqlType(FieldType type)
|
||||||
case FieldType::Float:
|
case FieldType::Float:
|
||||||
return "REAL";
|
return "REAL";
|
||||||
default:
|
default:
|
||||||
assert(false);
|
SW_UNIMPLEMENTED;
|
||||||
}
|
}
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void table::load(const buffer &b)
|
void table::load(const buffer &b)
|
||||||
|
|
@ -120,7 +121,7 @@ void value::load_fields(const tab &tab, buffer &b)
|
||||||
std::cout << "small float field: " << fv.size << "\n";
|
std::cout << "small float field: " << fv.size << "\n";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert(false);
|
SW_UNIMPLEMENTED;
|
||||||
}
|
}
|
||||||
fields.push_back(fv);
|
fields.push_back(fv);
|
||||||
}
|
}
|
||||||
|
|
@ -180,7 +181,7 @@ polygon4::tools::db::processed_db db::process() const
|
||||||
r[name] = f.f;
|
r[name] = f.f;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert(false);
|
SW_UNIMPLEMENTED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
auto table_name = process_string(tbl->second.name);
|
auto table_name = process_string(tbl->second.name);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue