Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2011-06-26 01:18:14 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:20:05 +0300
commitc58c4ec772b6c924246b20f12c90cb2a803b5034 (patch)
tree315a591817ec314171649f29e012c6ffae28ff19
parentbb666aaa3d97c045a67f0c2910a1b9d70c475c6a (diff)
Replace stdlib.hpp with cstdlib.hpp;
Replace stdio.hpp with cstdio.hpp; Replace time.hpp with systime.hpp;
-rw-r--r--base/memory_mapped_file.hpp2
-rw-r--r--base/timer.cpp2
-rw-r--r--coding/internal/file64_api.hpp2
-rw-r--r--coding/timsort/timsort.cpp2
-rw-r--r--generator/classif_routine.cpp10
-rw-r--r--generator/xml_element.cpp2
-rw-r--r--indexer/drawing_rule_def.cpp2
-rw-r--r--platform/platform_tests/platform_test.cpp30
-rw-r--r--platform/preferred_languages.cpp2
-rw-r--r--platform/wifi_info_windows.cpp2
-rw-r--r--qt/main.cpp2
-rw-r--r--std/cstdio.hpp (renamed from std/stdio.hpp)2
-rw-r--r--std/std.config1
-rw-r--r--std/std.creator1
-rw-r--r--std/std.files32
-rw-r--r--std/std.includes0
-rw-r--r--std/stdlib.hpp12
-rw-r--r--std/systime.hpp (renamed from std/time.hpp)0
-rw-r--r--words/words_tests/sorted_index_test.cpp2
19 files changed, 32 insertions, 76 deletions
diff --git a/base/memory_mapped_file.hpp b/base/memory_mapped_file.hpp
index f5e5defc2d..1e4f8bffdb 100644
--- a/base/memory_mapped_file.hpp
+++ b/base/memory_mapped_file.hpp
@@ -4,7 +4,7 @@
#include "../std/target_os.hpp"
#include "../std/windows.hpp"
-#include "../std/stdio.hpp"
+#include "../std/cstdio.hpp"
class MemoryMappedFile
{
diff --git a/base/timer.cpp b/base/timer.cpp
index a789a57956..0b632eda1e 100644
--- a/base/timer.cpp
+++ b/base/timer.cpp
@@ -1,7 +1,7 @@
#include "timer.hpp"
#include "../std/target_os.hpp"
-#include "../std/time.hpp"
+#include "../std/systime.hpp"
#include "../std/ctime.hpp"
#include "../std/stdint.hpp"
diff --git a/coding/internal/file64_api.hpp b/coding/internal/file64_api.hpp
index be30be87b7..1b30cd5e4b 100644
--- a/coding/internal/file64_api.hpp
+++ b/coding/internal/file64_api.hpp
@@ -32,4 +32,4 @@
#endif
-#include "../../std/stdio.hpp"
+#include "../../std/cstdio.hpp"
diff --git a/coding/timsort/timsort.cpp b/coding/timsort/timsort.cpp
index df7027a0ea..533ab21456 100644
--- a/coding/timsort/timsort.cpp
+++ b/coding/timsort/timsort.cpp
@@ -1,7 +1,7 @@
#include "timsort.hpp"
#include "../../std/memcpy.hpp"
-#include "../../std/stdlib.hpp"
+#include "../../std/cstdlib.hpp"
typedef int cmpFunc(const void *, const void *);
diff --git a/generator/classif_routine.cpp b/generator/classif_routine.cpp
index dd9a6248e7..f666f26a9d 100644
--- a/generator/classif_routine.cpp
+++ b/generator/classif_routine.cpp
@@ -4,15 +4,7 @@
#include "../indexer/classificator.hpp"
#include "../indexer/drawing_rules.hpp"
-//#include "../indexer/scales.hpp"
-
-//#include "../coding/reader.hpp"
-
-//#include "../base/logging.hpp"
-
-//#include "../std/stdio.hpp"
-
-//#include "../base/start_mem_debug.hpp"
+#include "../base/start_mem_debug.hpp"
namespace classificator
diff --git a/generator/xml_element.cpp b/generator/xml_element.cpp
index 0a92750f6d..294dbaf552 100644
--- a/generator/xml_element.cpp
+++ b/generator/xml_element.cpp
@@ -2,7 +2,7 @@
#include "../coding/parse_xml.hpp"
#include "../coding/reader.hpp"
-#include "../std/stdio.hpp"
+#include "../std/cstdio.hpp"
#include "../std/algorithm.hpp"
diff --git a/indexer/drawing_rule_def.cpp b/indexer/drawing_rule_def.cpp
index f4da5f5f6c..5484d40885 100644
--- a/indexer/drawing_rule_def.cpp
+++ b/indexer/drawing_rule_def.cpp
@@ -6,7 +6,7 @@
#include "../base/assert.hpp"
#include "../base/string_utils.hpp"
-#include "../std/stdio.hpp"
+#include "../std/cstdio.hpp"
#include "../base/start_mem_debug.hpp"
diff --git a/platform/platform_tests/platform_test.cpp b/platform/platform_tests/platform_test.cpp
index 90fb92e02f..daa18061ea 100644
--- a/platform/platform_tests/platform_test.cpp
+++ b/platform/platform_tests/platform_test.cpp
@@ -4,8 +4,10 @@
#include "../../defines.hpp"
-#include "../../std/stdio.hpp"
+#include "../../coding/writer.hpp"
+#include "../../coding/internal/file_data.hpp"
+#include "../../base/logging.hpp"
#include "../../base/start_mem_debug.hpp"
@@ -14,17 +16,25 @@ char const * TEST_FILE_NAME = "some_temporary_unit_test_file.tmp";
UNIT_TEST(WritableDir)
{
string const path = GetPlatform().WritableDir() + TEST_FILE_NAME;
- FILE * f = fopen(path.c_str(), "w");
- TEST_NOT_EQUAL(f, 0, ("Can't create file", path));
- if (f)
- fclose(f);
- remove(path.c_str());
+
+ try
+ {
+ my::FileData f(path, my::FileData::OP_WRITE_TRUNCATE);
+ }
+ catch (Writer::OpenException const &)
+ {
+ LOG(LCRITICAL, ("Can't create file"));
+ return;
+ }
+
+ my::DeleteFileX(path);
}
UNIT_TEST(WritablePathForFile)
{
- string const p1 = GetPlatform().WritableDir() + TEST_FILE_NAME;
- string const p2 = GetPlatform().WritablePathForFile(TEST_FILE_NAME);
+ Platform & pl = GetPlatform();
+ string const p1 = pl.WritableDir() + TEST_FILE_NAME;
+ string const p2 = pl.WritablePathForFile(TEST_FILE_NAME);
TEST_EQUAL(p1, p2, ());
}
@@ -35,7 +45,7 @@ UNIT_TEST(ReadPathForFile)
Platform & p = GetPlatform();
for (size_t i = 0; i < ARRAY_SIZE(arr); ++i)
{
- TEST_GREATER( p.ReadPathForFile(arr[i]).size(), 0, ("File should exist!") );
+ TEST_GREATER(p.ReadPathForFile(arr[i]).size(), 0, ("File should exist!"));
}
bool wasException = false;
@@ -47,7 +57,7 @@ UNIT_TEST(ReadPathForFile)
{
wasException = true;
}
- TEST( wasException, ());
+ TEST_EQUAL(wasException, true, ());
}
UNIT_TEST(GetFilesInDir)
diff --git a/platform/preferred_languages.cpp b/platform/preferred_languages.cpp
index 4f46fb07e1..f78dde9548 100644
--- a/platform/preferred_languages.cpp
+++ b/platform/preferred_languages.cpp
@@ -17,7 +17,7 @@
#define MUI_LANGUAGE_NAME 0x8
#elif defined(OMIM_OS_LINUX)
- #include "../std/stdlib.hpp"
+ #include "../std/cstdlib.hpp"
#elif defined(OMIM_OS_ANDROID)
/// @TODO
diff --git a/platform/wifi_info_windows.cpp b/platform/wifi_info_windows.cpp
index 2a226ec558..7ba77cf9b4 100644
--- a/platform/wifi_info_windows.cpp
+++ b/platform/wifi_info_windows.cpp
@@ -7,7 +7,7 @@
#include "../base/logging.hpp"
#include "../std/windows.hpp"
-#include "../std/stdio.hpp"
+#include "../std/cstdio.hpp"
#include <winsock2.h>
#include <iphlpapi.h>
diff --git a/qt/main.cpp b/qt/main.cpp
index baf4067b81..51ceb90e04 100644
--- a/qt/main.cpp
+++ b/qt/main.cpp
@@ -11,7 +11,7 @@
#include "../version/version.hpp"
-#include "../std/stdio.hpp"
+#include "../std/cstdio.hpp"
#include <QtGui/QApplication>
diff --git a/std/stdio.hpp b/std/cstdio.hpp
index 298a3b998d..6831cc9b85 100644
--- a/std/stdio.hpp
+++ b/std/cstdio.hpp
@@ -5,7 +5,7 @@
#undef new
#endif
-#include <stdio.h>
+#include <cstdio>
#ifdef DEBUG_NEW
#define new DEBUG_NEW
diff --git a/std/std.config b/std/std.config
deleted file mode 100644
index 8cec188b38..0000000000
--- a/std/std.config
+++ /dev/null
@@ -1 +0,0 @@
-// ADD PREDEFINED MACROS HERE!
diff --git a/std/std.creator b/std/std.creator
deleted file mode 100644
index e94cbbd302..0000000000
--- a/std/std.creator
+++ /dev/null
@@ -1 +0,0 @@
-[General]
diff --git a/std/std.files b/std/std.files
deleted file mode 100644
index 51149e39d1..0000000000
--- a/std/std.files
+++ /dev/null
@@ -1,32 +0,0 @@
-algorithm.hpp
-array.hpp
-auto_ptr.hpp
-bind.hpp
-cstdlib.hpp
-cmath.hpp
-exception.hpp
-fstream.hpp
-function.hpp
-ios.hpp
-iostream.hpp
-iterator.hpp
-limits.hpp
-list.hpp
-map.hpp
-numeric.hpp
-queue.hpp
-scoped_array.hpp
-scoped_ptr.hpp
-set.hpp
-shared_ptr.hpp
-sstream.hpp
-string.hpp
-tuple.hpp
-type_traits.hpp
-typeinfo.hpp
-unordered_map.hpp
-unordered_set.hpp
-utility.hpp
-vector.hpp
-cstdio.hpp
-common_defines.hpp
diff --git a/std/std.includes b/std/std.includes
deleted file mode 100644
index e69de29bb2..0000000000
--- a/std/std.includes
+++ /dev/null
diff --git a/std/stdlib.hpp b/std/stdlib.hpp
deleted file mode 100644
index b8079a6f96..0000000000
--- a/std/stdlib.hpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#pragma once
-#include "common_defines.hpp"
-
-#ifdef new
-#undef new
-#endif
-
-#include <stdlib.h>
-
-#ifdef DEBUG_NEW
-#define new DEBUG_NEW
-#endif
diff --git a/std/time.hpp b/std/systime.hpp
index c535b83e50..c535b83e50 100644
--- a/std/time.hpp
+++ b/std/systime.hpp
diff --git a/words/words_tests/sorted_index_test.cpp b/words/words_tests/sorted_index_test.cpp
index de5d8db8a0..e704776ef1 100644
--- a/words/words_tests/sorted_index_test.cpp
+++ b/words/words_tests/sorted_index_test.cpp
@@ -7,7 +7,7 @@
#include "../../std/set.hpp"
#include "../../std/string.hpp"
#include "../../std/vector.hpp"
-#include "../../std/stdio.hpp"
+#include "../../std/cstdio.hpp"
namespace
{