switched commandfunction to vector<string>

This commit is contained in:
Nicholas O'Connor
2017-03-23 15:13:52 -07:00
parent ad670b5033
commit b4f5740006
8 changed files with 17 additions and 8 deletions

View File

@@ -1,10 +1,12 @@
#include <iostream>
#include <string>
#include <vector>
#include "bottles.hpp"
#include "internal/bottles.hpp"
using namespace std;
void cellar::bottles::switch_active_bottle(int argc, char** argv) {
void cellar::bottles::switch_active_bottle(int argc, vector<string> argv) {
cout << argc << endl;
}

View File

@@ -2,6 +2,7 @@
#include <iostream>
#include <map>
#include <string>
#include <vector>
#include "bottles.hpp"
#include "internal/bottles.hpp"
@@ -9,7 +10,7 @@
using namespace std;
using namespace cellar::bottles;
void cellar::bottles::print_active_bottle(int argc, char** argv) {
void cellar::bottles::print_active_bottle(int argc, vector<string> argv) {
map<string, Bottle> bottlemap = get_bottles();
if (bottlemap.find(".wine") == bottlemap.end()) { // not found
cout << "no active wine bottle" << endl;

View File

@@ -75,7 +75,7 @@ DLL_PUBLIC map<string, Bottle> cellar::bottles::get_bottles() {
return result;
}
void cellar::bottles::print_bottles(int argc, char** argv) {
void cellar::bottles::print_bottles(int argc, vector<string> argv) {
map<string, Bottle> bottles = get_bottles();
for (auto item : bottles) {