Changeset 10265 for code/trunk/src
- Timestamp:
- Feb 11, 2015, 11:17:57 PM (10 years ago)
- Location:
- code/trunk/src/libraries/core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/core/Loader.cc
r10264 r10265 160 160 std::string xmlInput; 161 161 162 shared_ptr<std::vector<std::vector<std::pair<std::string, size_t> >>> lineTrace(new std::vector<std::vector<std::pair<std::string, size_t>>>());162 shared_ptr<std::vector<std::vector<std::pair<std::string, size_t> > > > lineTrace(new std::vector<std::vector<std::pair<std::string, size_t> > >()); 163 163 lineTrace->reserve(1000); //arbitrary number 164 164 … … 251 251 if (line <= lineTrace->size()) 252 252 { 253 std::vector<std::pair<std::string, size_t> > linesources = lineTrace->at(line - 1);253 std::vector<std::pair<std::string, size_t> > linesources = lineTrace->at(line - 1); 254 254 orxout(user_error, context::loader) << "Line contains data from:" << endl; 255 for (std::vector<std::pair<std::string, size_t> >::iterator it = linesources.begin(); it != linesources.end(); ++it)255 for (std::vector<std::pair<std::string, size_t> >::iterator it = linesources.begin(); it != linesources.end(); ++it) 256 256 { 257 257 orxout(user_error, context::loader) << it->first << " , Line " << it->second << endl; -
code/trunk/src/libraries/core/LuaState.cc
r10264 r10265 245 245 //Note: due to newlines etc., it's possible that one line consists of parts of 246 246 // multiple, different files 247 std::vector<std::vector<std::pair<std::string, size_t> >>::reverse_iterator it = lineTrace_->rbegin();247 std::vector<std::vector<std::pair<std::string, size_t> > >::reverse_iterator it = lineTrace_->rbegin(); 248 248 std::pair<std::string, size_t> temppair = std::make_pair(filename, line); 249 249 //Avoid duplicate entries. This could happen if there were lua blocks on the same line … … 259 259 { 260 260 //Add the new line to the trace map 261 lineTrace_->push_back(std::vector<std::pair<std::string, size_t> >());261 lineTrace_->push_back(std::vector<std::pair<std::string, size_t> >()); 262 262 //Add the source of the line at the end 263 263 lineTrace_->rbegin()->push_back(std::make_pair(filename, line + i)); -
code/trunk/src/libraries/core/LuaState.h
r10264 r10265 94 94 void clearOutput() { output_.clear(); } // tolua_export 95 95 96 void setTraceMap(shared_ptr<std::vector<std::vector<std::pair<std::string, size_t> >>> map)97 { map->push_back(std::vector<std::pair<std::string, size_t> >()); lineTrace_ = map; }96 void setTraceMap(shared_ptr<std::vector<std::vector<std::pair<std::string, size_t> > > > map) 97 { map->push_back(std::vector<std::pair<std::string, size_t> >()); lineTrace_ = map; } 98 98 99 99 void setIncludeParser(std::string (*function)(const std::string&)) { includeParseFunction_ = function; } … … 116 116 private: 117 117 shared_ptr<ResourceInfo> getFileInfo(const std::string& filename); 118 shared_ptr<std::vector<std::vector<std::pair<std::string, size_t> >>> lineTrace_;118 shared_ptr<std::vector<std::vector<std::pair<std::string, size_t> > > > lineTrace_; 119 119 120 120 std::stringstream output_;
Note: See TracChangeset
for help on using the changeset viewer.