aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-06-19 09:51:03 +0000
committerlloyd <[email protected]>2006-06-19 09:51:03 +0000
commit7612c768e68202cfffbfdab2bc973b0f63bd0a03 (patch)
tree3b00287a609622cb2d0730413232718070958ae2 /src
parentdad5f59194f8d153af423461c1fd20cebfc6661e (diff)
Use preincrement instead of postincrement inside of some loops (mostly
for consistency with code that uses STL iterators, as these were mostly integer operations, though with one exception).
Diffstat (limited to 'src')
-rw-r--r--src/datastor.cpp2
-rw-r--r--src/mem_pool.cpp2
-rw-r--r--src/x509_ext.cpp6
-rw-r--r--src/x509find.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/datastor.cpp b/src/datastor.cpp
index a8f1a2740..05282d131 100644
--- a/src/datastor.cpp
+++ b/src/datastor.cpp
@@ -67,7 +67,7 @@ std::vector<std::string> Data_Store::get(const std::string& looking_for) const
std::pair<iter, iter> range = contents.equal_range(looking_for);
std::vector<std::string> out;
- for(iter i = range.first; i != range.second; i++)
+ for(iter i = range.first; i != range.second; ++i)
out.push_back(i->second);
return out;
}
diff --git a/src/mem_pool.cpp b/src/mem_pool.cpp
index b157c1e59..4b68a7549 100644
--- a/src/mem_pool.cpp
+++ b/src/mem_pool.cpp
@@ -252,7 +252,7 @@ byte* Pooling_Allocator::allocate_blocks(u32bit n)
do
{
- i++;
+ ++i;
if(i == blocks.end())
i = blocks.begin();
diff --git a/src/x509_ext.cpp b/src/x509_ext.cpp
index 38d2fbabb..52bfca553 100644
--- a/src/x509_ext.cpp
+++ b/src/x509_ext.cpp
@@ -59,7 +59,7 @@ OID Certificate_Extension::oid_of() const
*************************************************/
void Extensions::encode_into(DER_Encoder& to_object) const
{
- for(u32bit j = 0; j != extensions.size(); j++)
+ for(u32bit j = 0; j != extensions.size(); ++j)
{
const Certificate_Extension* ext = extensions[j];
@@ -351,7 +351,7 @@ void Extended_Key_Usage::decode_inner(const MemoryRegion<byte>& in)
*************************************************/
void Extended_Key_Usage::contents_to(Data_Store& subject, Data_Store&) const
{
- for(u32bit j = 0; j != oids.size(); j++)
+ for(u32bit j = 0; j != oids.size(); ++j)
subject.add("X509v3.ExtendedKeyUsage", oids[j].as_string());
}
@@ -413,7 +413,7 @@ void Certificate_Policies::decode_inner(const MemoryRegion<byte>& in)
*************************************************/
void Certificate_Policies::contents_to(Data_Store& info, Data_Store&) const
{
- for(u32bit j = 0; j != oids.size(); j++)
+ for(u32bit j = 0; j != oids.size(); ++j)
info.add("X509v3.ExtendedKeyUsage", oids[j].as_string());
}
diff --git a/src/x509find.cpp b/src/x509find.cpp
index f78c037b5..fe614758d 100644
--- a/src/x509find.cpp
+++ b/src/x509find.cpp
@@ -53,7 +53,7 @@ class DN_Check : public X509_Store::Search_Func
{
std::vector<std::string> info = cert.subject_info(dn_entry);
- for(u32bit j = 0; j != info.size(); j++)
+ for(u32bit j = 0; j != info.size(); ++j)
if(compare(info[j], looking_for))
return true;
return false;