Browse Source

simplified loading string from eth resources

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
367e977c21
  1. 8
      cmake/scripts/resource.hpp.in

8
cmake/scripts/resource.hpp.in

@ -2,7 +2,6 @@
#pragma once #pragma once
#include <string> #include <string>
#include <sstream>
#include <map> #include <map>
namespace dev namespace dev
@ -19,12 +18,7 @@ ${ETH_RESULT_DATA}
${ETH_RESULT_INIT} ${ETH_RESULT_INIT}
} }
std::string loadResourceAsString(std::string _name) std::string loadResourceAsString(std::string _name) { return std::string(m_resources[_name], m_sizes[_name]); }
{
std::ostringstream bistream;
bistream.write(m_resources[_name], m_sizes[_name]);
return bistream.str();
}
private: private:
std::map <std::string, const char*> m_resources; std::map <std::string, const char*> m_resources;

Loading…
Cancel
Save