Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitefd0c27

Browse files
committed
Remove padding_length() from the encoding state; the count of padding characters becomes private
1 parentc98c471 commitefd0c27

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

‎boost/network/utils/base64/encode-io.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ struct state : public boost::network::utils::base64::state<Value> {
110110

111111
// allow only the construction with an output stream (strict RAII)
112112
state();
113-
state(state<Char, Value>const & source);
113+
state(state<Char, Value>const &);
114114

115115
std::basic_ostream<Char> & output;
116116

‎boost/network/utils/base64/encode.hpp‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ namespace utils {
2222
// struct state<Value> {
2323
// bool empty () const;
2424
// void clear();
25-
// unsigned short padding_length() const;
2625
// }
2726
//
2827
// OutputIterator encode(InputIterator begin, InputIterator end,
@@ -85,12 +84,6 @@ struct state {
8584
last_encoded_value =0;
8685
}
8786

88-
unsignedshortpadding_length()const {
89-
// the fewer octets from the triplet processed, the more characters
90-
// needed as padding padding - that is why the complement here
91-
return triplet_index ?3 - triplet_index :0;
92-
}
93-
9487
protected:
9588
// number of the octet in the incomplete quantum, which has been
9689
// processed the last time; 0 means that the previous quantum was
@@ -414,12 +407,12 @@ std::basic_string<Char> encode(char const * value) {
414407
return result;
415408
}
416409

417-
//the function overloads for string literals encode the input without
410+
//The function overloads for string literals encode the input without
418411
// the terminating zero, which is usually expected, because the trailing
419412
// zero byte is not considered a part of the string value; the overloads
420-
//foran input range would wrap the string literal by Boost.Range and
421-
//encodethe full memory occupated by the string literal - including the
422-
// unwanted last zero byte
413+
//for an input range would wrap the string literal by Boost.Range and
414+
//encode the full memory occupated by the string literal - including the
415+
// unwanted last zero byte.
423416

424417
}// namespace base64
425418

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp