aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/asn1/asn1_str.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-01-08 19:15:29 -0500
committerJack Lloyd <[email protected]>2016-01-08 19:18:13 -0500
commite33ca7736bc7b0b66ae14e8d3e879b58b2924239 (patch)
tree58459585e6675cd799b6ef5900be026825cd6f9d /src/lib/asn1/asn1_str.cpp
parent2fbfdd7e5afb5e888fd8c0b56c6df09e2bdeaca7 (diff)
parentd22bc10cd4f67924acd82bcd46a31e3de3b20ce3 (diff)
Merge GH #398 Mass prefix all member vars with m_
Diffstat (limited to 'src/lib/asn1/asn1_str.cpp')
-rw-r--r--src/lib/asn1/asn1_str.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/lib/asn1/asn1_str.cpp b/src/lib/asn1/asn1_str.cpp
index 05be90e3d..809448888 100644
--- a/src/lib/asn1/asn1_str.cpp
+++ b/src/lib/asn1/asn1_str.cpp
@@ -62,22 +62,22 @@ ASN1_Tag choose_encoding(const std::string& str,
/*
* Create an ASN1_String
*/
-ASN1_String::ASN1_String(const std::string& str, ASN1_Tag t) : tag(t)
+ASN1_String::ASN1_String(const std::string& str, ASN1_Tag t) : m_tag(t)
{
- iso_8859_str = Charset::transcode(str, LOCAL_CHARSET, LATIN1_CHARSET);
-
- if(tag == DIRECTORY_STRING)
- tag = choose_encoding(iso_8859_str, "latin1");
-
- if(tag != NUMERIC_STRING &&
- tag != PRINTABLE_STRING &&
- tag != VISIBLE_STRING &&
- tag != T61_STRING &&
- tag != IA5_STRING &&
- tag != UTF8_STRING &&
- tag != BMP_STRING)
+ m_iso_8859_str = Charset::transcode(str, LOCAL_CHARSET, LATIN1_CHARSET);
+
+ if(m_tag == DIRECTORY_STRING)
+ m_tag = choose_encoding(m_iso_8859_str, "latin1");
+
+ if(m_tag != NUMERIC_STRING &&
+ m_tag != PRINTABLE_STRING &&
+ m_tag != VISIBLE_STRING &&
+ m_tag != T61_STRING &&
+ m_tag != IA5_STRING &&
+ m_tag != UTF8_STRING &&
+ m_tag != BMP_STRING)
throw Invalid_Argument("ASN1_String: Unknown string type " +
- std::to_string(tag));
+ std::to_string(m_tag));
}
/*
@@ -85,8 +85,8 @@ ASN1_String::ASN1_String(const std::string& str, ASN1_Tag t) : tag(t)
*/
ASN1_String::ASN1_String(const std::string& str)
{
- iso_8859_str = Charset::transcode(str, LOCAL_CHARSET, LATIN1_CHARSET);
- tag = choose_encoding(iso_8859_str, "latin1");
+ m_iso_8859_str = Charset::transcode(str, LOCAL_CHARSET, LATIN1_CHARSET);
+ m_tag = choose_encoding(m_iso_8859_str, "latin1");
}
/*
@@ -94,7 +94,7 @@ ASN1_String::ASN1_String(const std::string& str)
*/
std::string ASN1_String::iso_8859() const
{
- return iso_8859_str;
+ return m_iso_8859_str;
}
/*
@@ -102,7 +102,7 @@ std::string ASN1_String::iso_8859() const
*/
std::string ASN1_String::value() const
{
- return Charset::transcode(iso_8859_str, LATIN1_CHARSET, LOCAL_CHARSET);
+ return Charset::transcode(m_iso_8859_str, LATIN1_CHARSET, LOCAL_CHARSET);
}
/*
@@ -110,7 +110,7 @@ std::string ASN1_String::value() const
*/
ASN1_Tag ASN1_String::tagging() const
{
- return tag;
+ return m_tag;
}
/*