diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-06 10:12:14 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-06 10:12:14 +0200 |
commit | f82ed52a4959cecae176600180f967328d924ce6 (patch) | |
tree | 32f747c8423c0206dbed74123207a006362b90a7 /bpkg/package.cxx | |
parent | fd2c0dc9707714d82580dc61854efc06335e6091 (diff) |
Rename package to selected_package, state to package_state
Diffstat (limited to 'bpkg/package.cxx')
-rw-r--r-- | bpkg/package.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/bpkg/package.cxx b/bpkg/package.cxx index e764c3f..2612cbe 100644 --- a/bpkg/package.cxx +++ b/bpkg/package.cxx @@ -124,26 +124,26 @@ namespace bpkg // state // string - to_string (state s) + to_string (package_state s) { switch (s) { - case state::broken: return "broken"; - case state::fetched: return "fetched"; - case state::unpacked: return "unpacked"; - case state::configured: return "configured"; + case package_state::broken: return "broken"; + case package_state::fetched: return "fetched"; + case package_state::unpacked: return "unpacked"; + case package_state::configured: return "configured"; } return string (); // Should never reach. } - state - to_state (const string& s) + package_state + to_package_state (const string& s) { - if (s == "broken") return state::broken; - else if (s == "fetched") return state::fetched; - else if (s == "unpacked") return state::unpacked; - else if (s == "configured") return state::configured; + if (s == "broken") return package_state::broken; + else if (s == "fetched") return package_state::fetched; + else if (s == "unpacked") return package_state::unpacked; + else if (s == "configured") return package_state::configured; else throw invalid_argument ("invalid package state '" + s + "'"); } } |