forked from organicmaps/organicmaps
git-clang-format
This commit is contained in:
parent
b924153592
commit
600ee9ab36
3 changed files with 8 additions and 11 deletions
|
@ -9,22 +9,21 @@
|
|||
|
||||
#include "std/target_os.hpp"
|
||||
|
||||
|
||||
namespace
|
||||
{
|
||||
string GetTextSourceString(platform::TextSource textSouce)
|
||||
{
|
||||
#if defined(OMIM_OS_ANDROID) || defined(OMIM_OS_IPHONE)
|
||||
switch(textSouce)
|
||||
switch (textSouce)
|
||||
{
|
||||
case platform::TextSource::TtsSound:
|
||||
return "sound-strings";
|
||||
case platform::TextSource::TtsSound:
|
||||
return "sound-strings";
|
||||
}
|
||||
#else
|
||||
switch(textSouce)
|
||||
switch (textSouce)
|
||||
{
|
||||
case platform::TextSource::TtsSound:
|
||||
return "../data/sound-strings";
|
||||
case platform::TextSource::TtsSound:
|
||||
return "../data/sound-strings";
|
||||
}
|
||||
#endif
|
||||
ASSERT(false, ());
|
||||
|
@ -35,8 +34,8 @@ namespace platform
|
|||
{
|
||||
GetTextById::GetTextById(TextSource textSouce, string const & localeName)
|
||||
{
|
||||
string const pathToJson = my::JoinFoldersToPath({GetTextSourceString(textSouce),
|
||||
localeName + ".json"}, "localize.json");
|
||||
string const pathToJson = my::JoinFoldersToPath(
|
||||
{GetTextSourceString(textSouce), localeName + ".json"}, "localize.json");
|
||||
|
||||
string jsonBuffer;
|
||||
ReaderPtr<Reader>(GetPlatform().GetReader(pathToJson)).ReadAsString(jsonBuffer);
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include <std/string.hpp>
|
||||
#include <std/unordered_map.hpp>
|
||||
|
||||
|
||||
namespace platform
|
||||
{
|
||||
// class GetTextById is ready to work with different sources of text strings.
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include "platform/get_text_by_id.hpp"
|
||||
|
||||
|
||||
using namespace platform;
|
||||
|
||||
UNIT_TEST(GetTextByIdEnglishTest)
|
||||
|
|
Loading…
Add table
Reference in a new issue