summaryrefslogtreecommitdiffstats
path: root/libsync
diff options
context:
space:
mode:
authormtezych <mte.zych@gmail.com>2017-01-29 19:45:57 +0100
committerGreg Hackmann <ghackmann@google.com>2017-01-30 23:39:03 +0000
commit380b2f4fea745f4db30e5cb2ac7f5a638b33c652 (patch)
tree34ed433f94141e53e955cac62302b17cec64d75c /libsync
parent9cd890e9b7a1ae1d354815f529a0b3df1dd07aea (diff)
downloadsystem_core-380b2f4fea745f4db30e5cb2ac7f5a638b33c652.tar.gz
system_core-380b2f4fea745f4db30e5cb2ac7f5a638b33c652.tar.bz2
system_core-380b2f4fea745f4db30e5cb2ac7f5a638b33c652.zip
libsync: Replace inserting tuple into unordered_map in favour of pair.
Inserting tuple into unordered_map relies on non standard libc++ extension: http://stackoverflow.com/a/21313229 This change removes this dependency. Test: sync-unit-tests (on hikey with SW_SYNC_USER built into kernel)
Diffstat (limited to 'libsync')
-rw-r--r--libsync/tests/sync_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsync/tests/sync_test.cpp b/libsync/tests/sync_test.cpp
index ff8a300f1..401aaeee5 100644
--- a/libsync/tests/sync_test.cpp
+++ b/libsync/tests/sync_test.cpp
@@ -536,7 +536,7 @@ TEST_P(MergeStressTest, RandomMerge) {
ASSERT_TRUE(fence.isValid());
unordered_map<int, int> fenceMap;
- fenceMap.insert(make_tuple(0, 0));
+ fenceMap.insert(make_pair(0, 0));
// Randomly create syncpoints out of a fixed set of timelines, and merge them together.
for (int i = 0; i < mergeCount; i++) {
@@ -549,12 +549,12 @@ TEST_P(MergeStressTest, RandomMerge) {
// Keep track of the latest syncpoint in each timeline.
auto itr = fenceMap.find(timelineOffset);
if (itr == end(fenceMap)) {
- fenceMap.insert(tie(timelineOffset, syncPoint));
+ fenceMap.insert(make_pair(timelineOffset, syncPoint));
}
else {
int oldSyncPoint = itr->second;
fenceMap.erase(itr);
- fenceMap.insert(tie(timelineOffset, max(syncPoint, oldSyncPoint)));
+ fenceMap.insert(make_pair(timelineOffset, max(syncPoint, oldSyncPoint)));
}
// Merge.