Merge pull request #32 from pmeerw/cleanup

Some cleanup
toml-checker
Duncan Ogilvie 3 years ago committed by GitHub
commit a28e63fddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5,9 +5,9 @@
#include "fs.hpp"
#include <sstream>
#include <stddef.h>
#include <cstddef>
#include <stdexcept>
#include <stdlib.h>
#include <cstdlib>
#include <system_error>
namespace cmkr {
@ -94,4 +94,4 @@ int cmkr_build_install(void) {
} catch (...) {
return cmkr::error::Status(cmkr::error::Status::Code::InstallError);
}
}
}

@ -1,6 +1,6 @@
#include "error.hpp"
#include <assert.h>
#include <cassert>
namespace cmkr {
namespace error {
@ -14,11 +14,12 @@ Status::Code Status::code() const noexcept { return ec_; }
} // namespace error
} // namespace cmkr
const char *err_string[] = {
"Success", "Runtime error", "Initialization error", "CMake generation error", "Build error",
// strings for cmkr::error::Status::Code
static const char *err_string[] = {
"Success", "Runtime error", "Initialization error", "CMake generation error", "Build error", "Clean error", "Install error",
};
const char *cmkr_error_status(int i) {
assert(i >= 0 && i < 5);
assert(i >= 0 && i < (sizeof(err_string) / sizeof(*(err_string))));
return err_string[i];
}
}

Loading…
Cancel
Save