switched commandfunction to vector<string>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user