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

Commitbc2fbde

Browse files
committed
Fixed bug issue 111. It seems there was a problem in the assignment operators where the parsing was not done correctly, causing undefined behaviour.
1 parent51fe256 commitbc2fbde

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

‎include/network/uri/uri.hpp‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ class BOOST_URI_DECL uri {
4545

4646
}
4747

48-
//uri(const value_type *uri)
49-
// : uri_(uri), is_valid_(false) {
50-
// parse();
51-
//}
52-
5348
uri(const string_type &uri)
5449
: uri_(uri), is_valid_(false) {
5550
parse();
@@ -69,13 +64,15 @@ class BOOST_URI_DECL uri {
6964
}
7065

7166
uri &operator = (const uri &other) {
72-
uri(other).swap(*this);
67+
uri_ = other.uri_;
68+
parse();
7369
return *this;
7470
}
7571

7672
uri &operator = (const string_type &uri_string) {
77-
uri(uri_string).swap(*this);
78-
return *this;
73+
uri_ = uri_string;
74+
parse();
75+
return *this;
7976
}
8077

8178
~uri() {

‎libs/network/example/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ target_link_libraries(hello_world_client
121121
cppnetlib-http-client
122122
cppnetlib-http-client-connections)
123123

124-
target_link_libraries(uri_builder${OPENSSL_LIBRARIES})
125124
if (OPENSSL_FOUND)
125+
target_link_libraries(uri_builder${OPENSSL_LIBRARIES})
126126
#target_link_libraries(http_client ${OPENSSL_LIBRARIES})
127127
target_link_libraries(simple_wget${OPENSSL_LIBRARIES})
128128
target_link_libraries(atom_reader${OPENSSL_LIBRARIES})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp