Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
dongwlin committed Nov 20, 2023
1 parent ae99063 commit 4c28f77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/cli/Cache/AdbConfigCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ std::string AdbConfigCache::get_default_adb_config()

std::stringstream buffer;
buffer << ifs.rdbuf();
std::string adb_config = buffer.str();
ifs.close();

return adb_config;
return buffer.str();
}

std::string AdbConfigCache::generate_cache_key(const std::string& device_name, const std::string& device_SN)
Expand Down Expand Up @@ -91,6 +91,7 @@ bool AdbConfigCache::load(const std::string& cache_key, std::string& adb_config)
std::stringstream buffer;
buffer << ifs.rdbuf();
adb_config = buffer.str();
ifs.close();

// Update cache map
cache_map[cache_key] = adb_config;
Expand Down
1 change: 1 addition & 0 deletions source/cli/Cache/AdbConfigCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <fstream>
#include <functional>
#include <iostream>
#include <sstream>
#include <unordered_map>

class AdbConfigCache : public Cache
Expand Down

0 comments on commit 4c28f77

Please sign in to comment.