- A few Vulkan wrapper structs
- Framework for Vulkan context - Fixed a bug with dynarray where if `resize()` shrinks the array, destructors are not called. - Fixed grammar issues with the containers library and added property tables to existing data structures.
This commit is contained in:
@@ -42,7 +42,7 @@ path path::current() {
|
||||
if (getcwd(cstr, sizeof(cstr)) == nullptr) {
|
||||
return path("");
|
||||
}
|
||||
return path(cstring(cstr, strlen(cstr) + 1));
|
||||
return path(cstring(cstr, strlen(cstr)));
|
||||
}
|
||||
|
||||
path path::current(const path& path) {
|
||||
|
||||
@@ -30,7 +30,7 @@ void _assert_impl(const char* expr, size_t expr_l,
|
||||
fennec::cstring(expr, expr_l),
|
||||
fennec::cstring(file, file_l), line,
|
||||
fennec::cstring(func, func_l),
|
||||
fennec::cstring(desc, ::strlen(desc) + 1)
|
||||
fennec::cstring(desc, ::strlen(desc))
|
||||
);
|
||||
|
||||
if (halt) {
|
||||
|
||||
@@ -112,7 +112,7 @@ void wayland_server::connect() {
|
||||
#endif
|
||||
|
||||
auto contexts = ctx_registry::get_type_list();
|
||||
while (not contexts.empty()) {
|
||||
while (not contexts.is_empty()) {
|
||||
const auto& ctx = contexts.front();
|
||||
gfx_context = unique_ptr(ctx.ctor(this));
|
||||
|
||||
@@ -125,7 +125,7 @@ void wayland_server::connect() {
|
||||
}
|
||||
}
|
||||
|
||||
assertf(not gfx_context.empty(), "Failed to create graphics context.");
|
||||
assertf(not gfx_context.is_empty(), "Failed to create graphics context.");
|
||||
}
|
||||
|
||||
void wayland_server::disconnect() {
|
||||
@@ -191,7 +191,7 @@ void wayland_server::_wl_registry_listen_global(void* data, wl_registry* reg, ui
|
||||
};
|
||||
|
||||
wayland_server* server = static_cast<wayland_server*>(data);
|
||||
const cstring interface = cstring(name, strlen(name) + 1);
|
||||
const cstring interface = cstring(name, strlen(name));
|
||||
|
||||
if (interface == "wl_compositor") {
|
||||
server->compositor = static_cast<wl_compositor*>(wl_registry_bind(reg, id, &wl_compositor_interface, version));
|
||||
|
||||
@@ -44,7 +44,7 @@ void window_manager::initialize() {
|
||||
display_server::entrylist_t display_servers = display_server::get_type_list();
|
||||
|
||||
// Find first valid server
|
||||
while (not display_servers.empty()) {
|
||||
while (not display_servers.is_empty()) {
|
||||
display_server::entry it = display_servers.front();
|
||||
display_servers.pop();
|
||||
|
||||
|
||||
@@ -21,8 +21,5 @@
|
||||
namespace fennec
|
||||
{
|
||||
|
||||
gfxpass* glcontext::create_pass() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace fennec
|
||||
scene_node* scene::operator[](const cstring& name) const {
|
||||
list<size_t> parse;
|
||||
parse.push_back(table_t::root);
|
||||
while (not parse.empty()) {
|
||||
while (not parse.is_empty()) {
|
||||
size_t n = parse.front();
|
||||
if (_table[n]->name == name) {
|
||||
return _table[n].get();
|
||||
@@ -54,7 +54,7 @@ scene_node* scene::operator[](const cstring& name) const {
|
||||
scene_node* scene::operator[](const string& name) const {
|
||||
list<size_t> parse;
|
||||
parse.push_back(table_t::root);
|
||||
while (not parse.empty()) {
|
||||
while (not parse.is_empty()) {
|
||||
size_t n = parse.front();
|
||||
if (_table[n]->name == name) {
|
||||
return _table[n].get();
|
||||
|
||||
Reference in New Issue
Block a user