Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于/WebServer/base/AsyncLogging.cpp文件中的两个问题 #119

Open
lcy0950 opened this issue Apr 27, 2021 · 1 comment
Open

关于/WebServer/base/AsyncLogging.cpp文件中的两个问题 #119

lcy0950 opened this issue Apr 27, 2021 · 1 comment

Comments

@lcy0950
Copy link

lcy0950 commented Apr 27, 2021

  • if (!newBuffer1) {
    
  •   assert(!buffersToWrite.empty());
    
  •   newBuffer1 = buffersToWrite.back();
    
  •   buffersToWrite.pop_back();
    
  •   newBuffer1->reset();
    
  • }
    

    if中的判断在这里一定是true

  • buffersToWrite.clear();
    

在第111行里面,buffersToWrite一定是空的.
向请教下上面两个地方是否理解正确。 如果理解正确了,那么第111行改成assert应该可以更好一点。

@ljluestc
Copy link

提问前仔细看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants