Skip to content

Commit 846356e

Browse files
author
Vincent Raman
committed
Replaced tabs by 4 spaces
1 parent 764a488 commit 846356e

File tree

1 file changed

+99
-99
lines changed

1 file changed

+99
-99
lines changed

src/sio_message.h

Lines changed: 99 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ namespace sio
2727
flag_binary,
2828
flag_array,
2929
flag_object,
30-
flag_boolean,
31-
flag_null
30+
flag_boolean,
31+
flag_null
3232
};
3333

34-
virtual ~message(){};
34+
virtual ~message(){};
3535

3636
class list;
3737

@@ -42,11 +42,11 @@ namespace sio
4242

4343
typedef shared_ptr<message> ptr;
4444

45-
virtual bool get_bool() const
46-
{
47-
assert(false);
48-
return false;
49-
}
45+
virtual bool get_bool() const
46+
{
47+
assert(false);
48+
return false;
49+
}
5050

5151
virtual int64_t get_int() const
5252
{
@@ -114,26 +114,26 @@ namespace sio
114114
message(flag f):_flag(f){}
115115
};
116116

117-
class null_message : public message
118-
{
119-
protected:
117+
class null_message : public message
118+
{
119+
protected:
120120
null_message()
121-
:message(flag_null)
121+
:message(flag_null)
122122
{
123123
}
124124

125-
public:
125+
public:
126126
static message::ptr create()
127127
{
128128
return ptr(new null_message());
129129
}
130-
};
130+
};
131131

132-
class bool_message : public message
133-
{
134-
bool _v;
132+
class bool_message : public message
133+
{
134+
bool _v;
135135

136-
protected:
136+
protected:
137137
bool_message(bool v)
138138
:message(flag_boolean),_v(v)
139139
{
@@ -149,7 +149,7 @@ namespace sio
149149
{
150150
return _v;
151151
}
152-
};
152+
};
153153

154154
class int_message : public message
155155
{
@@ -265,53 +265,53 @@ namespace sio
265265
}
266266

267267
void push(const string& text)
268-
{
269-
_v.push_back(string_message::create(text));
270-
}
268+
{
269+
_v.push_back(string_message::create(text));
270+
}
271271

272272
void push(string&& text)
273-
{
274-
_v.push_back(string_message::create(move(text)));
275-
}
273+
{
274+
_v.push_back(string_message::create(move(text)));
275+
}
276276

277277
void push(shared_ptr<string> const& binary)
278-
{
279-
if(binary)
280-
_v.push_back(binary_message::create(binary));
281-
}
278+
{
279+
if(binary)
280+
_v.push_back(binary_message::create(binary));
281+
}
282282

283283
void push(shared_ptr<const string> const& binary)
284-
{
285-
if(binary)
286-
_v.push_back(binary_message::create(binary));
287-
}
284+
{
285+
if(binary)
286+
_v.push_back(binary_message::create(binary));
287+
}
288288

289289
void insert(size_t pos,message::ptr const& message)
290290
{
291291
_v.insert(_v.begin()+pos, message);
292292
}
293293

294294
void insert(size_t pos,const string& text)
295-
{
296-
_v.insert(_v.begin()+pos, string_message::create(text));
297-
}
295+
{
296+
_v.insert(_v.begin()+pos, string_message::create(text));
297+
}
298298

299299
void insert(size_t pos,string&& text)
300-
{
301-
_v.insert(_v.begin()+pos, string_message::create(move(text)));
302-
}
300+
{
301+
_v.insert(_v.begin()+pos, string_message::create(move(text)));
302+
}
303303

304304
void insert(size_t pos,shared_ptr<string> const& binary)
305-
{
306-
if(binary)
307-
_v.insert(_v.begin()+pos, binary_message::create(binary));
308-
}
305+
{
306+
if(binary)
307+
_v.insert(_v.begin()+pos, binary_message::create(binary));
308+
}
309309

310310
void insert(size_t pos,shared_ptr<const string> const& binary)
311-
{
312-
if(binary)
313-
_v.insert(_v.begin()+pos, binary_message::create(binary));
314-
}
311+
{
312+
if(binary)
313+
_v.insert(_v.begin()+pos, binary_message::create(binary));
314+
}
315315

316316
size_t size() const
317317
{
@@ -357,39 +357,39 @@ namespace sio
357357
}
358358

359359
void insert(const string & key,const string& text)
360-
{
361-
_v[key] = string_message::create(text);
362-
}
360+
{
361+
_v[key] = string_message::create(text);
362+
}
363363

364364
void insert(const string & key,string&& text)
365-
{
366-
_v[key] = string_message::create(move(text));
367-
}
365+
{
366+
_v[key] = string_message::create(move(text));
367+
}
368368

369369
void insert(const string & key,shared_ptr<string> const& binary)
370-
{
371-
if(binary)
372-
_v[key] = binary_message::create(binary);
373-
}
370+
{
371+
if(binary)
372+
_v[key] = binary_message::create(binary);
373+
}
374374

375375
void insert(const string & key,shared_ptr<const string> const& binary)
376-
{
377-
if(binary)
378-
_v[key] = binary_message::create(binary);
379-
}
376+
{
377+
if(binary)
378+
_v[key] = binary_message::create(binary);
379+
}
380380

381381
bool has(const string & key)
382382
{
383-
return _v.find(key) != _v.end();
383+
return _v.find(key) != _v.end();
384384
}
385385

386386
const message::ptr& at(const string & key) const
387387
{
388-
static shared_ptr<message> not_found;
388+
static shared_ptr<message> not_found;
389389

390-
map<string,message::ptr>::const_iterator it = _v.find(key);
391-
if (it != _v.end()) return it->second;
392-
return not_found;
390+
map<string,message::ptr>::const_iterator it = _v.find(key);
391+
if (it != _v.end()) return it->second;
392+
return not_found;
393393
}
394394

395395
const message::ptr& operator[] (const string & key) const
@@ -399,7 +399,7 @@ namespace sio
399399

400400
bool has(const string & key) const
401401
{
402-
return _v.find(key) != _v.end();
402+
return _v.find(key) != _v.end();
403403
}
404404

405405
map<string,message::ptr>& get_map()
@@ -436,10 +436,10 @@ namespace sio
436436
return *this;
437437
}
438438

439-
template <typename T>
440-
list(T&& content,
441-
typename enable_if<is_same<vector<message::ptr>,typename remove_reference<T>::type>::value>::type* = 0):
442-
m_vector(std::forward<T>(content))
439+
template <typename T>
440+
list(T&& content,
441+
typename enable_if<is_same<vector<message::ptr>,typename remove_reference<T>::type>::value>::type* = 0):
442+
m_vector(std::forward<T>(content))
443443
{
444444
}
445445

@@ -485,53 +485,53 @@ namespace sio
485485
}
486486

487487
void push(const string& text)
488-
{
489-
m_vector.push_back(string_message::create(text));
490-
}
488+
{
489+
m_vector.push_back(string_message::create(text));
490+
}
491491

492492
void push(string&& text)
493-
{
494-
m_vector.push_back(string_message::create(move(text)));
495-
}
493+
{
494+
m_vector.push_back(string_message::create(move(text)));
495+
}
496496

497497
void push(shared_ptr<string> const& binary)
498-
{
499-
if(binary)
500-
m_vector.push_back(binary_message::create(binary));
501-
}
498+
{
499+
if(binary)
500+
m_vector.push_back(binary_message::create(binary));
501+
}
502502

503503
void push(shared_ptr<const string> const& binary)
504-
{
505-
if(binary)
506-
m_vector.push_back(binary_message::create(binary));
507-
}
504+
{
505+
if(binary)
506+
m_vector.push_back(binary_message::create(binary));
507+
}
508508

509509
void insert(size_t pos,message::ptr const& message)
510510
{
511511
m_vector.insert(m_vector.begin()+pos, message);
512512
}
513513

514514
void insert(size_t pos,const string& text)
515-
{
516-
m_vector.insert(m_vector.begin()+pos, string_message::create(text));
517-
}
515+
{
516+
m_vector.insert(m_vector.begin()+pos, string_message::create(text));
517+
}
518518

519519
void insert(size_t pos,string&& text)
520-
{
521-
m_vector.insert(m_vector.begin()+pos, string_message::create(move(text)));
522-
}
520+
{
521+
m_vector.insert(m_vector.begin()+pos, string_message::create(move(text)));
522+
}
523523

524524
void insert(size_t pos,shared_ptr<string> const& binary)
525-
{
526-
if(binary)
527-
m_vector.insert(m_vector.begin()+pos, binary_message::create(binary));
528-
}
525+
{
526+
if(binary)
527+
m_vector.insert(m_vector.begin()+pos, binary_message::create(binary));
528+
}
529529

530530
void insert(size_t pos,shared_ptr<const string> const& binary)
531-
{
532-
if(binary)
533-
m_vector.insert(m_vector.begin()+pos, binary_message::create(binary));
534-
}
531+
{
532+
if(binary)
533+
m_vector.insert(m_vector.begin()+pos, binary_message::create(binary));
534+
}
535535

536536
size_t size() const
537537
{

0 commit comments

Comments
 (0)