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 "fs.hpp"
#include <sstream> #include <sstream>
#include <stddef.h> #include <cstddef>
#include <stdexcept> #include <stdexcept>
#include <stdlib.h> #include <cstdlib>
#include <system_error> #include <system_error>
namespace cmkr { namespace cmkr {

@ -1,6 +1,6 @@
#include "error.hpp" #include "error.hpp"
#include <assert.h> #include <cassert>
namespace cmkr { namespace cmkr {
namespace error { namespace error {
@ -14,11 +14,12 @@ Status::Code Status::code() const noexcept { return ec_; }
} // namespace error } // namespace error
} // namespace cmkr } // namespace cmkr
const char *err_string[] = { // strings for cmkr::error::Status::Code
"Success", "Runtime error", "Initialization error", "CMake generation error", "Build error", 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) { 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]; return err_string[i];
} }
Loading…
Cancel
Save